Testing for template argument being result of takeExactly

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Sep 26 08:08:17 PDT 2012


On 9/26/12 9:50 AM, monarch_dodra wrote:
> struct S{};
>
> is(typeof(takeExactly(S, 1)) == S) //false
> is(S == typeof(takeExactly(S, 1))) //Error: template
> std.range.takeExactly does not match any function template declaration

Neither should work. The expression should be takeExactly(S.init, 1).

Andrei


More information about the Digitalmars-d-learn mailing list