Index: boost/foreach.hpp =================================================================== --- boost/foreach.hpp (revision 74924) +++ boost/foreach.hpp (working copy) @@ -33,7 +33,9 @@ // Some compilers support rvalue references and auto type deduction. // With these C++0x features, temporary collections can be bound to // rvalue references and their lifetime is extended. No copy/move is needed. -#if !defined(BOOST_NO_DECLTYPE) && !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_DECLTYPE) && !defined(BOOST_NO_RVALUE_REFERENCES) \ + && !(BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ == 4) && !defined(BOOST_INTEL) && \ + !defined(BOOST_CLANG)) # define BOOST_FOREACH_USE_RVALUE_REFERENCE_BINDING // Some compilers let us detect even const-qualified rvalues at compile-time #elif !defined(BOOST_NO_RVALUE_REFERENCES) \