post qualifier and template constraint limitation, is there a reason ?

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 19 04:54:23 PST 2015


On 1/18/15 10:57 PM, Walter Bright wrote:
> On 1/18/2015 7:07 PM, deadalnix wrote:
>> On Monday, 19 January 2015 at 02:24:00 UTC, Walter Bright wrote:
>>> On 1/18/2015 12:46 AM, Brian Schott wrote:
>>>> On Sunday, 18 January 2015 at 08:40:19 UTC, Walter Bright wrote:
>>>>> Sounds like a good idea. If I wasn't clear, I think that class
>>>>> change was a
>>>>> mistake.
>>>>
>>>> Now that I see from that pull request that the ugly syntax was the
>>>> original, I'm
>>>> not so sure. The dfix feature I'm planning is to convert
>>>>
>>>> class A if (B) : C
>>>>
>>>> to
>>>>
>>>> class A : C if (B)
>>>
>>> The other way around. Consider:
>>>
>>>   class A(T) : C!(args), D!(more args), E!(lots of stuff) if (B)
>>>
>>> the 'if' becomes significantly separated from A.
>>
>> That's exactly why I thing both should be allowed.
>
> No. Constraints belong after the template declaration, not embedded in
> the template's implementation.

I just want to point out then, the OP is asking for this same thing 
(template constraint to be allowed after the template declaration).

-Steve


More information about the Digitalmars-d mailing list