Question:
I would like to have a type trait that would be false for any parameter T except for the enum valueHttp::Get
If I instead do :
Any reason why that is the case, and what are the workarounds to achieve what I want.
I basically want the compiler to return the type trait to false even when T is not of a enum type
Http
Answer:
typename
and class
expect types. Http::Get
is (presumably) not a type, but a value, like any other constant (42
, 'A'
, false
etc.). And you obviously cannot pass a value when a type is expected.The solution would be different depending on your use cases. For example:
If you have better answer, please add a comment about this, thank you!