constraint on variadic template
Alex via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Dec 7 09:28:23 PST 2016
On Wednesday, 7 December 2016 at 17:08:09 UTC, Gary Willoughby
wrote:
>
> Will some like this work?
>
> import std.range.primitives;
>
> mixin template S(T...) if(__traits(hasMember,
> ElementType!(T), "run"))
> {
> ...
> }
>
> https://dlang.org/phobos/std_range_primitives.html#ElementType
Nope:
template instance ElementType!(rFS, rAS) does not match template
declaration ElementType(R)
More information about the Digitalmars-d-learn
mailing list