construction of class in a methode of a template

hi,

suppose i have a template

1
2
3
4
5
6
template <typename T>
class loop{
public:
isvalid();
T* getnext();
}


suppose now the type of the template is a classe that i had defined.
can i call the constructor of this classe in the methode T* getnext();

thinks!
Yes but you might specialize your template if the constructor if you can have Ts with different constructors
Topic archived. No new replies allowed.