From 280aadfcdb65a5de2313d8b328a48d5920fdb838 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Wed, 16 Jul 2014 16:43:35 +0400 Subject: [PATCH] Fix compilation problems with clang Apparently, clang presents itself as gcc 4.2 even though it supports the final version of rvalue references. Restrict the workaround to gcc only. --- include/boost/smart_ptr/detail/sp_forward.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/smart_ptr/detail/sp_forward.hpp b/include/boost/smart_ptr/detail/sp_forward.hpp index 3372665..8fdec65 100644 --- a/include/boost/smart_ptr/detail/sp_forward.hpp +++ b/include/boost/smart_ptr/detail/sp_forward.hpp @@ -25,7 +25,7 @@ namespace detail #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) -#if defined( __GNUC__ ) && __GNUC__ * 100 + __GNUC_MINOR__ <= 404 +#if defined( BOOST_GCC ) && __GNUC__ * 100 + __GNUC_MINOR__ <= 404 // GCC 4.4 supports an outdated version of rvalue references and creates a copy of the forwarded object. // This results in warnings 'returning reference to temporary'. Therefore we use a special version similar to std::forward.