为什么char_traits不能作用于"non POD type"?
Char_traits.h里面写到:
// Generic char_traits class. Note that this class is provided only
// as a base for explicit specialization; it is unlikely to be useful
// as is for any particular user-defined type. In particular, it
// *will not work* for a non-POD type.
这个限制到底是什么意思呢?
[解决办法]
就说明CHAR是POD类型呀
在模板特化时候会用到
[解决办法]
一般用户自定义类型就不行比如
struct Test{
Test(){}
int i;
};