Template Question
    Bill Baxter 
    dnewsgroup at billbaxter.com
       
    Mon Apr 14 20:35:26 PDT 2008
    
    
  
Mike Parker wrote:
> Mike Parker wrote:
>> Bill Baxter wrote:
>>> Mike Parker wrote:
>>>> Bill Baxter wrote:
>>>>> Mike Parker wrote:
> 
>>
>> This is exactly what I was looking for. I don't understand it, but it 
>> works.
> 
> Actually, it doesn't work.
Ok, so in that case...
I think you can put an alias for the type inside an interface, and use 
that to work around:
interface Foo(T)
{
     alias T TheType;
     void init(T);
}
...
  static if ( is(U : Foo!(U.TheType)) ) {
    ...
   }
That seems to work.
--bb
    
    
More information about the Digitalmars-d-learn
mailing list