From: maier Date: Thu, 1 Aug 2013 23:00:20 +0000 (+0000) Subject: Workaround for a bug in the boost foreign_ptr.hpp header [1] X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5051cacc1e139b2c962978d3d250b28c05fbae9c;p=dealii-svn.git Workaround for a bug in the boost foreign_ptr.hpp header [1] It is invalid to forward declare things in the std namespace. This works with libstdc++ by accident but not with libc++ that uses inline namespace features. [1] https://svn.boost.org/trac/boost/ticket/6655 git-svn-id: https://svn.dealii.org/trunk@30211 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp b/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp index 3e2357b8e8..50496b50df 100644 --- a/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp +++ b/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp @@ -18,14 +18,6 @@ #include #include -#if !defined(BOOST_INTEL_STDCXX0X) -namespace std -{ - template class shared_ptr; - template class weak_ptr; -} -#endif - namespace boost { template class shared_ptr; @@ -39,10 +31,20 @@ namespace boost { typedef boost::shared_ptr shared_type; }; + +// Workaround for a bug in boost: +// https://svn.boost.org/trac/boost/ticket/6655 +// +// It should be save to depend on DEAL macros at this point as this header +// should only be used by deal.II and dependend projects... +// +// - Maier, 2013 +#ifdef DEAL_II_CAN_USE_CXX11 template struct weak_ptr_traits > { typedef std::shared_ptr shared_type; }; +#endif template struct shared_ptr_traits {}; @@ -51,10 +53,13 @@ namespace boost { typedef boost::weak_ptr weak_type; }; +// as above +#ifdef DEAL_II_CAN_USE_CXX11 template struct shared_ptr_traits > { typedef std::weak_ptr weak_type; }; +#endif namespace detail { diff --git a/deal.II/include/deal.II/dofs/dof_handler.h b/deal.II/include/deal.II/dofs/dof_handler.h index 9e990e154e..93d765a670 100644 --- a/deal.II/include/deal.II/dofs/dof_handler.h +++ b/deal.II/include/deal.II/dofs/dof_handler.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include