On Tue, 11 Sep 2012 20:57:07 +0200, Maxim Fomin <ma...@maxim-fomin.ru> wrote:

I think it is UB rather than a bug. The spec says that return types must match exactly. AFAIK auto is a feature to infer return type, not to magically adjust to multiple incompatible types.

I'd be surprised if this were not a bug. My expectation would be that the
types be combined as with the ?: operator, just like std.traits.CommonType.

If this is not a bug, it's certainly worth filing as an enhancement request.

--
Simen

Reply via email to