
On Thu, Jan 22, 2015 at 12:20 AM, Andrzej Krzemienski <akrzemi1@gmail.com> wrote:
2015-01-21 22:14 GMT+01:00 Andrey Semashev <andrey.semashev@gmail.com>:
What kind of errors are we talking about? Does optional<T&> behave plain wrong on MSVC or is there a misbehavior in some narrow case? Does it compile invalid code, does it not compile valid one, or is there a miscompilation?
In most of the cases the program compiles but we have a run-time misbehavior: we store a reference to an unexpected temporary rather than to the original object.
Does it happen all the time or in some select cases? E.g. if binding a reference to an integer literal doesn't work but everything else does it's not a big deal since this rarely happens. I'm kind of worried by disabling the feature outright. If I'm writing portable code which uses optional<T&> and compiles with gcc, I would expect it to compile with MSVC as well.