DIP 1031--Deprecate Brace-Style Struct Initializers--Community Review Round 1 Discussion
Atila Neves
atila.neves at gmail.com
Thu Feb 13 12:54:26 UTC 2020
On Thursday, 13 February 2020 at 11:04:26 UTC, Robert M. Münch
wrote:
> On 2020-02-13 09:56:27 +0000, Walter Bright said:
>
>> On 2/13/2020 1:47 AM, IGotD- wrote:
>>> However, would
>>>
>>> S s = (1, 2);
>>>
>>> be allowed inferring the type?
>>
>> No. But you can write:
>>
>> auto s = S(1, 2);
>
> I never understood (but expect some good reason to exists) why
> I can't write:
>
> S s(1,2);
>
> which IMO is the most compact and clear form.
https://en.wikipedia.org/wiki/Most_vexing_parse
More information about the Digitalmars-d
mailing list