Answer the question
In order to leave comments, you need to log in
How to copy the behavior of a type passed as a class template argument?
There is a conditional class MagicClass
. It can copy the behavior of the type passed to it by the template argument:
MagicClass<int> some_var = 13;
MagicClass<std::string> another_var = "Some Text";
MagicClass<AnotherClass> yet_another_var = /*Some magic*/;
SomeClass<int> some_var = 12;
some_var++;
some_var *= (11 + 11);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question