id summary reporter owner description type status milestone component version severity resolution keywords cc 9053 "Infinite recursion assigning ""const any"" with GCC 4.8 in C++11 mode" Di-an Jan nasonov "Infinite recursion assigning ""`const any`"" with GCC 4.8 in C++11 mode because ""`boost::disable_if >`"" is not triggered with a ""`const any`"". This leads to infinite recursion at run time with no compiler warnings. Happens with Boost 1.54.0 and boost-trunk. {{{ $ cat test-any.cpp #include #include int main() { const boost::any a = 1; boost::any x = a; std::cout << boost::any_cast(x) << std::endl; return 0; } $ g++ -g --std=c++11 -pedantic -Wall -Wextra -I ~/boost-trunk test-any.cpp $ gdb ./a.out (gdb) r Starting program: a.out Program received signal SIGSEGV, Segmentation fault. 0x00007ffff731f2e7 in _int_malloc () from /lib64/libc.so.6 (gdb) bt -10 #224597 0x0000000000401399 in boost::any::any(boost::any const&&, boost::disable_if, void>::type*) ( this=0x604098, value=) at boost-trunk/boost/any.hpp:80 #224598 0x00000000004014fa in boost::any::holder::holder(boost::any const&&) (this=0x604090, value=) at boost-trunk/boost/any.hpp:188 #224599 0x0000000000401399 in boost::any::any(boost::any const&&, boost::disable_if, void>::type*) ( this=0x604078, value=) at boost-trunk/boost/any.hpp:80 #224600 0x00000000004014fa in boost::any::holder::holder(boost::any const&&) (this=0x604070, value=) at boost-trunk/boost/any.hpp:188 #224601 0x0000000000401399 in boost::any::any(boost::any const&&, boost::disable_if, void>::type*) ( this=0x604058, value=) at boost-trunk/boost/any.hpp:80 #224602 0x00000000004014fa in boost::any::holder::holder(boost::any const&&) (this=0x604050, value=) at boost-trunk/boost/any.hpp:188 #224603 0x0000000000401399 in boost::any::any(boost::any const&&, boost::disable_if, void>::type*) ( this=0x604038, value=) at boost-trunk/boost/any.hpp:80 #224604 0x00000000004014fa in boost::any::holder::holder(boost::any const&&) (this=0x604030, value=) at boost-trunk/boost/any.hpp:188 #224605 0x0000000000401399 in boost::any::any(boost::any const&&, boost::disable_if, void>::type*) ( this=0x7fffffffdcb0, value=) at boost-trunk/boost/any.hpp:80 #224606 0x0000000000400e20 in main () at test-any.cpp:5 }}}" Bugs closed Boost 1.55.0 any Boost 1.54.0 Problem duplicate