How do traits classes work and what do they do?

前端 未结 2 898
醉话见心
醉话见心 2020-11-29 23:50

I\'m reading Scott Meyers\' Effective C++. He is talking about traits classes, I understood that I need them to determine the type of the object during compilation time, but

2条回答
  •  死守一世寂寞
    2020-11-30 00:05

    Traits classes do not determine the type of the object. Instead, they provide additional information about a type, typically by defining typedefs or constants inside the trait.

提交回复
热议问题