auto limitation?

Namespace rswhite4 at googlemail.com
Tue Sep 11 12:29:58 PDT 2012


On Tuesday, 11 September 2012 at 19:27:40 UTC, Timon Gehr wrote:
> On 09/11/2012 08:57 PM, Maxim Fomin wrote:
>>
>> I think it is UB rather than a bug.
>
> No, this is a bug.
>
>> The spec says that return types must match exactly.
>
> Exactly. If it was UB, the spec would say the behaviour is 
> undefined if they don't match exactly.
>
>
>> AFAIK auto is a feature to infer return type, not to
>> magically adjust to multiple incompatible types.

So what? Should my code work or not?


More information about the Digitalmars-d-learn mailing list