id summary reporter owner description type status milestone component version severity resolution keywords cc 11751 variant of non-const references fails equality compare nikkoara@… Antony Polukhin "The following aborts: {{{#!c++ #include using variant_type = boost::variant< int& >; int main () { int a, b; variant_type v (a), u (b); v == u; return 0; } }}} Compile and run: {{{ $ g++ -std=c++14 -I/opt/boost/default/include t.cpp && ./a.out a.out: /opt/boost/default/include/boost/variant/detail/forced_return.hpp:39: T boost::detail::variant::forced_return() [with T = const int&]: Assertion `false' failed. Aborted (core dumped) }}} It seems that the cause is the instantiation of known_get for const T at line 905 in variant.hpp (1.59.0)." Bugs closed Boost 1.62.0 variant Boost 1.59.0 Problem fixed variant