9 Apr
2021
9 Apr
'21
5:14 a.m.
On 08.04.21 23:45, Edward Diener via Boost-users wrote:
If you just have:
#include
#include <string> boost::variant<__int128, char, std::string> v; v = 56;
This produces an error:
..\..\../boost/variant/variant.hpp:1578:38: error: call of overloaded 'initialize(void*, boost::move_detail::remove_reference
::type)' is ambiguous
That's because it /is/ ambiguous. The compiler does not know if you want to set the variant to a '__int128' or to a 'char'. You get the same error message if you substitute 'long' for '__int128'. -- Rainer Deyke (rainerd@eldwood.com)