Template design with required type parameters?

Hasan Aljudy hasan.aljudy at gmail.com
Fri Nov 10 18:07:30 PST 2006

Charles D Hixson wrote:
> Is it possible to design a template that requires, at compile time, that 
> it's parameters be of a particular type?
> I.e., that they include a certain class or interface among their ancestry?

//I think this should do it:
template( T : YourParticularType )
//see http://digitalmars.com/d/template.html
//scroll down to Specialization

More information about the Digitalmars-d-learn mailing list