From 76f3c1ddcc7d8b1f508fb065a41ae3c38b9c9cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=9Aniatowski?= Date: Mon, 8 Jun 2015 08:51:46 +0200 Subject: [PATCH] Fix std:: forward declaration compile error on GCC with libc++ The code should not assume that libc++ is only ever used with Clang. Fixes issue #11380, https://svn.boost.org/trac/boost/ticket/11380 --- include/boost/container/detail/std_fwd.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/container/detail/std_fwd.hpp b/include/boost/container/detail/std_fwd.hpp index a2931c1..73711eb 100644 --- a/include/boost/container/detail/std_fwd.hpp +++ b/include/boost/container/detail/std_fwd.hpp @@ -23,10 +23,12 @@ // Standard predeclarations ////////////////////////////////////////////////////////////////////////////// -#if defined(__clang__) && defined(_LIBCPP_VERSION) +#if defined(_LIBCPP_VERSION) #define BOOST_CONTAINER_CLANG_INLINE_STD_NS #pragma GCC diagnostic push +#if defined(__clang__) #pragma GCC diagnostic ignored "-Wc++11-extensions" +#endif #define BOOST_CONTAINER_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD #define BOOST_CONTAINER_STD_NS_END _LIBCPP_END_NAMESPACE_STD #elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE_VERSION) //GCC >= 4.6