id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5146,Assertion fails in visitation_impl.hpp with nested variants,Florian Goujeon ,Antony Polukhin,"Let test_variant be following typedef: {{{ typedef variant < int, ptr_to_test_variant > test_variant ; }}} ptr_to_test_variant is a simple class which contains a test_variant object allocated on the heap (to break the circular dependency, see attachment). Here is the test case: {{{ int main() { test_variant tv1 = 88; test_variant ptr_to_tv1 = ptr_to_test_variant(tv1); test_variant ptr_to_ptr_to_tv1 = ptr_to_test_variant(ptr_to_tv1); const ptr_to_test_variant& direct_ptr_to_ptr_to_tv1 = get(ptr_to_ptr_to_tv1); ptr_to_ptr_to_tv1 = direct_ptr_to_ptr_to_tv1.pointed_test_variant(); } }}} Here is the output: {{{ /usr/include/boost/variant/detail/visitation_impl.hpp:207: typename Visitor::result_type boost::detail::variant::visitation_impl(int, int, Visitor&, VPCV, mpl_::true_, NBF, W*, S*) [with W = mpl_::int_<20>, S = boost::detail::variant::visitation_impl_step, boost::mpl::l_iter >, Visitor = boost::variant::convert_copy_into, VPCV = void*, NBF = boost::variant::has_fallback_type_, typename Visitor::result_type = int, mpl_::true_ = mpl_::bool_]: Assertion `false' failed. }}} I'm experiencing the exact same issue with my own implementation of stack-based variant (using variadic templates) as well. I'd like to know how to fix this…",Bugs,closed,To Be Determined,variant,Boost 1.45.0,Problem,invalid,variant assert assertion nested,