Better implementation of Traits with Pattern, refer to the article as follows: Traits Technology: Type IF-else-the (one of STL core technology) Andrei Alexandrescu is translated by myan (see 9cbs)
Traits is a lot of benefits, but it is worse than the pattern mode, for example, if there is a new exception class (such as widge how to do? Capable. I have found that the implementation of traits can be achieved with a certain template technology. Below is my realization map