Nick Sabalausky wrote:
> "BCS" <[email protected]> wrote in message 
> news:[email protected]...
>> Hello Nick,
>>
>>
>>> So...is there any trickery I
>>> could do so that SubFoo!("sam") and SubFoo!("sam", "human") would
>>> resolve to the same subclass of Foo?
>> Make a SubFoo!(char[] s) that does your logic and if it passesa alises to 
>> SubFoo!(s,"")
>>
>>
> 
> I'm not sure I understand...? 
> 
> 

I think what he's trying to say is

template SubFoo!(char[] name, char[] type) {
  static if (name == "sam" && (type == "human" || type == "")) alias 
_SubFoo!("sam", "human") SubFoo;
  /* etc */
}

Reply via email to