post qualifier and template constraint limitation, is there a reason ?
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jan 19 04:56:47 PST 2015
On 1/17/15 3:33 AM, deadalnix wrote:
> This is accepted :
> auto fun(T)(T T) inout if(...) { ... }
>
> This is not :
> auto fun(T)(T T) if(...) inout { ... }
>
> Is there a reason ?
I kind of agree with you. Because this is short for:
template fun(T) if(...) { auto fun(T t) inout {...}}
I think it makes the most sense to put the constraint right after the
template.
BUT:
1. I don't think there should be 2 ways to do this
2. The current requirement is not so horrible.
I would leave it alone.
-Steve
More information about the Digitalmars-d
mailing list