Determine if a type if derived from a template parameter
Alex
AJ at gmail.com
Wed Apr 10 19:28:38 UTC 2019
e.g.,
class X(T,S)
{
T x;
S y;
}
Somehow determine if x's type is derived from the template
parameter.
I doubt D has this capability but it would be nice for certain
things. In my reflect library the types must be specified such as
Reflect!(X!(int,float)) and ideally I would like to do
Reflect!(X!(T,S)) to get generic reflection information. This
helps reduce overhead as one could reflect once on the generic
type, cache the results, then simply modify the results for
specifics.
More information about the Digitalmars-d
mailing list