is expression for template structs/classes instances?
d coder
dlang.coder at gmail.com
Mon Dec 20 20:23:49 PST 2010
Greetings
I want to find if a given struct type is instantiated from a
particular template struct type. For example:
struct S (T) {
alias T Type;
T t;
}
And later I want to find out if a given type is of type S(*)
(basically any type instantiated from template struct S). In fact I do
not know the type value T used at the time of instantiating S!(T).
I was looking at "is ( Type Identifier : TypeSpecialization ,
TemplateParameterList )" expression at
http://www.digitalmars.com/d/2.0/expression.html#IsExpression .
Thought there would be some way using that, but I could not find any.
Regards
Cherry
More information about the Digitalmars-d-learn
mailing list