From 94365353186818a5e88290110ac9caad528132c5 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 11 Dec 2011 21:43:01 +0000 Subject: [PATCH] Unordered: Fix `complex` type for gcc's standard library. Fixes #6139. I haven't had any confirmation, but I assume this fixes the problem. [SVN r75909] --- include/boost/detail/container_fwd.hpp | 16 +++++++++------- test/container_fwd/Jamfile | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/boost/detail/container_fwd.hpp b/include/boost/detail/container_fwd.hpp index 5e4e047..659e428 100644 --- a/include/boost/detail/container_fwd.hpp +++ b/include/boost/detail/container_fwd.hpp @@ -42,6 +42,10 @@ || defined(_GLIBCXX_PARALLEL) \ || defined(_GLIBCXX_PROFILE) # define BOOST_DETAIL_NO_CONTAINER_FWD +# else +# if defined(__GLIBCXX__) && __GLIBCXX__ >= 20040530 +# define BOOST_CONTAINER_FWD_COMPLEX_STRUCT +# endif # endif # elif defined(__STL_CONFIG_H) // generic SGI STL @@ -63,8 +67,6 @@ # elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) // Dinkumware Library (this has to appear after any possible replacement // libraries) - // - // Works fine. # else # define BOOST_DETAIL_NO_CONTAINER_FWD # endif @@ -117,11 +119,11 @@ namespace std template struct char_traits; #endif - #if BOOST_CLANG - template struct complex; - #else - template class complex; - #endif +#if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT) + template struct complex; +#else + template class complex; +#endif #if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE) template class deque; diff --git a/test/container_fwd/Jamfile b/test/container_fwd/Jamfile index b39d447..ab55bc2 100644 --- a/test/container_fwd/Jamfile +++ b/test/container_fwd/Jamfile @@ -11,6 +11,7 @@ project detail/test/container_fwd intel:on gcc:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion" darwin:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion" + clang:"-pedantic -Wextra -Wmismatched-tags" on ;