camelCase
The Case of the Mysterious Camel.
- Reaction score
- 362
How would I make a template class instantiable only with built-in types?
Like, only integers, chars, bools, enums, floats and pointers.
I haven't used type_traits at all because I never really got *how* to use it.
Like, for example, this should fail:
Like, only integers, chars, bools, enums, floats and pointers.
I haven't used type_traits at all because I never really got *how* to use it.
Like, for example, this should fail:
Code:
class NonBuiltIn {};
int main () {
TemplateClass<NonBuiltIn> this_should_fail; //Compile error
return 0;
}