On Wed Sep 03 2014 at 12:00:56 AM Andrzej Krzemienski
And the above incorrect behaviour is the consequence of a more simple bug in VC++. It allows two user defined conversions in copy initialization:
struct A { A(int &&) {}
};
struct B { operator int() { return 0; } };
int main() { A t = B(); }
This works in VC++, although the code is incorrect.
So it does sound like this is one of those r-value reference implementation bugs in MSVC that I've heard before but couldn't cite. Could it just be that Boost.Optional shouldn't turn on rvalue reference support with MSVC 2010? Will defining just the copy constructor "fix" it? More importantly is there something users of Boost 1.56.0 can do to side-step this particular issue in Boost.Optional?