type set
spir
denis.spir at gmail.com
Mon Feb 28 05:22:58 PST 2011
Hello,
I have a template condition that looks like this:
T check (T) () if (
is(T == DLogical) ||
is(T == DNumber) ||
is(T == DText) ||
is(T == DList) ||
is(T == DUnit)
) {
...
}
Is there a way to "factor out" such an expression using a kind of type set? If
only for cleaning the code; but also because such a set may get long.
T check (T) () if (is (T in validTypeSet)) {
...
}
Denis
--
_________________
vita es estrany
spir.wikidot.com
More information about the Digitalmars-d-learn
mailing list