id summary reporter owner description type status milestone component version severity resolution keywords cc 5279 [Foreach] Compile-time const rvalue detection fails with gcc 4.6 mimomorin@… Eric Niebler "Recently, gcc 4.6 changed the behavior of rvalue conversions (from gcc-4.6-20110305). You can see the related info here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47851 This breaks compile-time const rvalue detection in Boost.Foreach; Const rvalues are incorrectly treated as lvalues, and so a segmentation fault occurs in the following code: {{{ #include #include typedef const std::list clist; int main (int argc, char* argv[]) { BOOST_FOREACH(int x, clist(3)) {} return 0; } }}} Though gcc 4.6 is not yet released, I think this behavior is highly likely to happen in the release version. So I reported this problem here. " Patches closed Boost 1.47.0 foreach Boost Development Trunk Problem fixed