I understand they encode information about the type you instantiate them with, but how do they work? Say, for instance, the type trait std::is_class
. How does it do its work? All implementations seem like empty structs, and I gotta admit I'm scratching my head.
The names seem descriptive enough, so I can understand what they mean, but what are typical scenarios that make use of type traits?
I cannot find introductory resources on the subject (or questions on SO). Pointers would be appreciated.