|
Boost-Commit : |
From: john_at_[hidden]
Date: 2008-04-19 12:28:01
Author: johnmaddock
Date: 2008-04-19 12:28:00 EDT (Sat, 19 Apr 2008)
New Revision: 44595
URL: http://svn.boost.org/trac/boost/changeset/44595
Log:
Changed #includes to avoid circular dependencies between shared_ptr and TR1.
Text files modified:
trunk/boost/detail/shared_count.hpp | 7 +++++--
trunk/boost/shared_ptr.hpp | 6 +++++-
2 files changed, 10 insertions(+), 3 deletions(-)
Modified: trunk/boost/detail/shared_count.hpp
==============================================================================
--- trunk/boost/detail/shared_count.hpp (original)
+++ trunk/boost/detail/shared_count.hpp 2008-04-19 12:28:00 EDT (Sat, 19 Apr 2008)
@@ -28,8 +28,11 @@
#include <boost/detail/bad_weak_ptr.hpp>
#include <boost/detail/sp_counted_base.hpp>
#include <boost/detail/sp_counted_impl.hpp>
-
-#include <memory> // std::auto_ptr
+// In order to avoid circular dependencies with Boost.TR1
+// we make sure that our include of <memory> doesn't try to
+// pull in the TR1 headers: that's why we use this header
+// rather than including <memory> directly:
+#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
#include <functional> // std::less
#include <new> // std::bad_alloc
Modified: trunk/boost/shared_ptr.hpp
==============================================================================
--- trunk/boost/shared_ptr.hpp (original)
+++ trunk/boost/shared_ptr.hpp 2008-04-19 12:28:00 EDT (Sat, 19 Apr 2008)
@@ -20,7 +20,11 @@
#include <boost/detail/shared_ptr_nmt.hpp>
#else
-#include <memory> // for std::auto_ptr
+// In order to avoid circular dependencies with Boost.TR1
+// we make sure that our include of <memory> doesn't try to
+// pull in the TR1 headers: that's why we use this header
+// rather than including <memory> directly:
+#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
#include <boost/assert.hpp>
#include <boost/checked_delete.hpp>
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