Thread overview
Constructor template
May 02, 2007
niovol
May 02, 2007
BCS
May 09, 2007
bc
May 02, 2007
I tried to make a constructor template like this(T)() {...}, but the compilier doesn't allow to do it. Will there be such possibiliy? Or is it impossible?
May 02, 2007
niovol wrote:
> I tried to make a constructor template like this(T)() {...}, but the compilier doesn't allow to do it. Will there be such possibiliy? Or is it impossible?

Constructors are never virtual (the reason non-static class member templates are not allowed) so I don't see why they /aren't/ allowed.
May 09, 2007
On Wed, 02 May 2007 22:25:14 +0100, BCS <BCS@pathlink.com> wrote:

> niovol wrote:
>> I tried to make a constructor template like this(T)() {...}, but the compilier doesn't allow to do it. Will there be such possibiliy? Or is it impossible?
>
> Constructors are never virtual (the reason non-static class member templates are not allowed) so I don't see why they /aren't/ allowed.

non-static member template functions work though, albeit non-virtually.