Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59282 - in trunk: boost/detail libs/functional/hash/test
From: daniel_james_at_[hidden]
Date: 2010-01-27 14:32:40


Author: danieljames
Date: 2010-01-27 14:32:39 EST (Wed, 27 Jan 2010)
New Revision: 59282
URL: http://svn.boost.org/trac/boost/changeset/59282

Log:
Don't foward declare containers when using gcc's parallel library and
add a macro to disable forward declaration. Fixes #3866.
Added:
   trunk/libs/functional/hash/test/container_no_fwd_test.cpp (contents, props changed)
Text files modified:
   trunk/boost/detail/container_fwd.hpp | 4 +++-
   trunk/libs/functional/hash/test/Jamfile.v2 | 1 +
   2 files changed, 4 insertions(+), 1 deletions(-)

Modified: trunk/boost/detail/container_fwd.hpp
==============================================================================
--- trunk/boost/detail/container_fwd.hpp (original)
+++ trunk/boost/detail/container_fwd.hpp 2010-01-27 14:32:39 EST (Wed, 27 Jan 2010)
@@ -13,7 +13,9 @@
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
 
-#if ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) && defined(_GLIBCXX_DEBUG)) \
+#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) \
+ || ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
+ && (defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL))) \
     || BOOST_WORKAROUND(__BORLANDC__, > 0x551) \
     || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x842)) \
     || (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))

Modified: trunk/libs/functional/hash/test/Jamfile.v2
==============================================================================
--- trunk/libs/functional/hash/test/Jamfile.v2 (original)
+++ trunk/libs/functional/hash/test/Jamfile.v2 2010-01-27 14:32:39 EST (Wed, 27 Jan 2010)
@@ -47,6 +47,7 @@
             : <toolset>gcc:<define>_GLIBCXX_DEBUG
                 <toolset>darwin:<define>_GLIBCXX_DEBUG
             : container_fwd_gcc_debug ]
+ [ run container_no_fwd_test.cpp ]
         [ compile-fail hash_no_ext_fail_test.cpp ]
         [ compile-fail namespace_fail_test.cpp ]
         [ run hash_no_ext_macro_1.cpp ]

Added: trunk/libs/functional/hash/test/container_no_fwd_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/functional/hash/test/container_no_fwd_test.cpp 2010-01-27 14:32:39 EST (Wed, 27 Jan 2010)
@@ -0,0 +1,14 @@
+
+// Copyright 2010 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_DETAIL_NO_CONTAINER_FWD
+
+#include <boost/detail/container_fwd.hpp>
+
+int main()
+{
+ std::set<int> x;
+ std::vector<std::string> y;
+}
\ No newline at end of file


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk