I can’t seem to find the right syntax to specialize this template :
template <class Object, class Var, class Invert, class Step = Var, unsigned int FIXED = IW_GEOM_POINT>
class TSin : public BasicTween<Object, Var> {...
I want to keep <Object> as a template parameter but specialize all other parameters. I am trying it like this :
template <class Object>
class TSin<Object, CIwVec2, int, CIwVec2, IW_GEOM_POINT> {...
This gives errors.
Please can someone provide the right syntax to specialize the template and the syntax to instantiate the specialized version?
The error is you’re redefining
class TSin. I don’t think you can do that.What you can do is declare the generic template and specialize the definitions of the class:
or specialize the definitions of members of the class:
or declare a subclass:
I think the latter option is the best.