
2013/5/10 Antony Polukhin
2013/5/8 Igor R
: #include
//A simplified wrapper template<typename T> struct wrap { T t; wrap(T& _t) : t(_t) {} operator T() const { return t; } T force() const { return t; } }; struct A{}; struct B{};
typedef boost::variant my_variant;
int main() { A a; my_variant x(a); #ifndef WAR my_variant y = wrap
(x); #else my_variant y = wrap (x).force(); #endif }
Reproduced that error on 1.48.0 using MSVC.
FWIW, your case can be reproduced with even more trivial code:
#include
typedef boost::variant<int> my_variant; struct convertible { operator my_variant() const { return my_variant(); } };
int main() { convertible x; my_variant y = x; }
Reproduced that error on 1.48.0 using MSVC. Looks like this problem is not affected by latest changes in Boost. Have you changed the compiler during migration to Boost 1.53? Have been some code changes made during migration? Do you compile with same options before and after migration? -- Best regards, Antony Polukhin