| Thread overview |
|---|
May 02, 2007 Constructor template | ||||
|---|---|---|---|---|
| ||||
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 Re: Constructor template | ||||
|---|---|---|---|---|
| ||||
Posted in reply to niovol | 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 Re: Constructor template | ||||
|---|---|---|---|---|
| ||||
Posted in reply to BCS | 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.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply