Boost logo

Boost :

Subject: [boost] [signals2] Problem compiling with Intel V12.1 (Windows)
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2011-09-15 08:15:25


Compiling code using Boost.Signals2 fails using Intel V12.1 on Windows. The
reason is a forward declaration of std::weak_ptr and std::shared_ptr in the
signals2 code which creates a problem as Intel seems to import
std::tr1::weak_ptr into namespace std.

This patch fixes the issue:

--- forei-revBASE.svn002.tmp.hpp Wed Oct 07 15:56:56 2009
+++ boost/boost/signals2/detail/foreign_ptr.hpp Thu Sep 15 06:10:24 2011
@@ -12,16 +12,19 @@
 #define BOOST_SIGNALS2_FOREIGN_PTR_HPP
 
 #include <algorithm>
+#include <boost/config.hpp>
 #include <boost/assert.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <boost/smart_ptr/bad_weak_ptr.hpp>
 #include <boost/utility/swap.hpp>
 
+#if !defined(BOOST_INTEL_STDCXX0X)
 namespace std
 {
   template<typename T> class shared_ptr;
   template<typename T> class weak_ptr;
 }
+#endif
 
 namespace boost
 {

Ok to commit?

Regards Hartmut
---------------
http://boost-spirit.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk