6 May
2014
6 May
'14
11:45 a.m.
Hi, While tracking test failures in Boost.Optional library I discovered that the following program fires an assert in MS VC++ compiler (v. 10.0, 11.0, 12.0): #include <cassert> const int global_i = 0; struct TestingReferenceBinding { void operator=(const int& ii) { assert(&ii == &global_i); } void operator=(int&&) { } }; int main() { TestingReferenceBinding ttt; ttt = global_i; } Do you know if this a bug in VC++, or if that is supposed to be valid? Regards, &rzej