Index: boost-trunk/boost/foreach.hpp =================================================================== --- boost-trunk/boost/foreach.hpp (revision 69625) +++ boost-trunk/boost/foreach.hpp (working copy) @@ -31,7 +31,8 @@ // Some compilers let us detect even const-qualified rvalues at compile-time #if BOOST_WORKAROUND(BOOST_MSVC, >= 1310) && !defined(_PREFAST_) \ - || (BOOST_WORKAROUND(__GNUC__, >= 4) && !defined(BOOST_INTEL) && !defined(BOOST_CLANG)) \ + || (BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ <= 5) && !defined(BOOST_INTEL) && \ + !defined(BOOST_CLANG)) \ || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ >= 4) && !defined(BOOST_INTEL) && \ !defined(BOOST_CLANG)) # define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION