Cannot use the same template arguments on function as the ones on struct
anonymous via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Feb 11 14:24:52 PST 2015
On Wednesday, 11 February 2015 at 22:14:44 UTC, MrSmith wrote:
> http://dpaste.dzfl.pl/5f1d5d5d9e19
>
> Instead I need to use template constraint which is less compact.
> http://dpaste.dzfl.pl/571ae84d783e
>
> Why such behavior happens?
Seems to work when you add an empty template argument list to
`accepter()`, making it `accepter!()()`:
http://dpaste.dzfl.pl/2ec186453907
So, compiler bug, I guess? The error message says it tried
"!()()", but explicit "!()()" actually works. And the empty
template argument list should be optional anyway.
More information about the Digitalmars-d-learn
mailing list