Testing for template argument being result of takeExactly
Timon Gehr
timon.gehr at gmx.ch
Wed Sep 26 10:12:44 PDT 2012
On 09/26/2012 05:08 PM, Andrei Alexandrescu wrote:
> 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
http://d.puremagic.com/issues/show_bug.cgi?id=8220
https://github.com/D-Programming-Language/dmd/pull/1007
More information about the Digitalmars-d-learn
mailing list