constraint on variadic template
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Dec 7 09:40:29 PST 2016
On Wednesday, 7 December 2016 at 17:32:14 UTC, Alex wrote:
>> enum hasRun(T) = __traits(hasMember, T, "run");
> This is strange... I expect this to work... but it does not...
>
hasRun there ONLY takes types, whereas T... can take types,
values, aliases, etc.
Try making it hasRun(T...) and it will probably work, though
really, I'd say just use the helper function...
More information about the Digitalmars-d-learn
mailing list