Template function bug - or am i a retard? you decide.

Jarrett Billingsley kb3ctd2 at yahoo.com
Thu Dec 20 12:31:05 PST 2007


"BCS" <ao at pathlink.com> wrote in message 
news:ce0a3343270b28ca1114b0613b1a at news.digitalmars.com...
> Reply to Neal,
>
>> class A
>> {
>> int x[];
>> void read_array(alias var, T = typeof(var))(...){ return; }
>> void fail(){ read_array!(x)(); }
>> }
>
> I don't think you can have non static template functions in a class

Of course you can (though the spec still says otherwise).  You can't have 
_virtual_ templated methods in a class.  Templated methods are implicitly 
final. 




More information about the Digitalmars-d-learn mailing list