Type aliasing
    js.mdnq 
    js_adddot+mdng at gmail.com
       
    Tue Dec  4 08:47:43 PST 2012
    
    
  
On Tuesday, 4 December 2012 at 16:42:21 UTC, Adam D. Ruppe wrote:
> On Tuesday, 4 December 2012 at 16:34:50 UTC, js.mdnq wrote:
>> class myclass {
>>   int ID;
>> }
>
> Try something like this:
>
> class myclass {
>    typeof(uniqueID!T.Get()) ID;
>    this() {
>      ID = uniqueID!T.Get();
>    }
> }
>
>
> The typeof(expr...) can be used anywhere a type can be used.
Cool, I'll try it but ran into one problem after making my class 
generic. Yours should work, thanks.
    
    
More information about the Digitalmars-d-learn
mailing list