Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80038 - trunk/boost/functional/hash/detail
From: dnljms_at_[hidden]
Date: 2012-08-14 16:06:08


Author: danieljames
Date: 2012-08-14 16:06:07 EDT (Tue, 14 Aug 2012)
New Revision: 80038
URL: http://svn.boost.org/trac/boost/changeset/80038

Log:
Hash: Remove C++11 forward declarations.

It seems that on Visual C++ Dinkumware declares shared_ptr in std, but for
Intel C++ it imports it from std::tr1. I was thinking of doing a macro check
for this, but since we're close to release, just change it to always include
the headers and never forward declare the C++11 classes, which is much safer.

I might restore the forward declarations in the future, although I'm tempted
not to. I'm not sure the improvement in compile time is worth the hassle.

Text files modified:
   trunk/boost/functional/hash/detail/container_fwd_0x.hpp | 32 +++-----------------------------
   1 files changed, 3 insertions(+), 29 deletions(-)

Modified: trunk/boost/functional/hash/detail/container_fwd_0x.hpp
==============================================================================
--- trunk/boost/functional/hash/detail/container_fwd_0x.hpp (original)
+++ trunk/boost/functional/hash/detail/container_fwd_0x.hpp 2012-08-14 16:06:07 EDT (Tue, 14 Aug 2012)
@@ -11,45 +11,19 @@
 // std::array
 
 #if !defined(BOOST_NO_CXX11_HDR_ARRAY)
- // Don't forward declare std::array for Dinkumware, as it seems to be
- // just 'using std::tr1::array'.
-# if (defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
- !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)) || \
- (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
-# include <array>
-# else
-namespace std {
- template <class, std::size_t> class array;
-}
-# endif
+# include <array>
 #endif
 
 // std::tuple
 
 #if !defined(BOOST_NO_CXX11_HDR_TUPLE)
-# if (defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
- !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)) || \
- defined(BOOST_NO_VARIADIC_TEMPLATES)
-# include <tuple>
-# else
-namespace std {
- template <typename...> class tuple;
-}
-# endif
+# include <tuple>
 #endif
 
 // std::shared_ptr/std::unique_ptr
 
 #if !defined(BOOST_NO_CXX11_HDR_MEMORY)
-# if (defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
- !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD))
-# include <memory>
-# else
-namespace std {
- template <class> class shared_ptr;
- template <class, class> class unique_ptr;
-}
-# endif
+# include <memory>
 #endif
 
 #endif


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