auto limitation?

Timon Gehr timon.gehr at gmx.ch
Tue Sep 11 12:28:06 PDT 2012


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.
>


More information about the Digitalmars-d-learn mailing list