Skip to content
Snippets Groups Projects
Commit 6acc33aa authored by Oliver Sander's avatar Oliver Sander
Browse files

if an implementation of shared_ptr has been found in either std, tr1, or...

if an implementation of shared_ptr has been found in either std, tr1, or boost, then use that one.  If not fall back on our own

[[Imported from SVN: r5642]]
parent ab5a73f2
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,17 @@ ...@@ -5,6 +5,17 @@
#ifndef DUNE_SHARED_PTR_HH #ifndef DUNE_SHARED_PTR_HH
#define DUNE_SHARED_PTR_HH #define DUNE_SHARED_PTR_HH
#if defined HAVE_MEMORY
# include <memory>
#endif
#if defined HAVE_TR1_MEMORY
# include <tr1/memory>
#endif
#if defined HAVE_BOOST_SHARED_PTR_HPP
# include <boost/shared_ptr.hpp>
#endif
/** /**
* @file * @file
* @brief This file implements the class shared_ptr (a reference counting * @brief This file implements the class shared_ptr (a reference counting
...@@ -13,6 +24,11 @@ ...@@ -13,6 +24,11 @@
*/ */
namespace Dune namespace Dune
{ {
// A shared_ptr implementation has been found if SHARED_PTR_NAMESPACE is set at all
#ifdef SHARED_PTR_NAMESPACE
using SHARED_PTR_NAMESPACE :: shared_ptr;
#else
/** @addtogroup Common /** @addtogroup Common
* *
* @{ * @{
...@@ -175,5 +191,7 @@ namespace Dune ...@@ -175,5 +191,7 @@ namespace Dune
rep_=0; rep_=0;
} }
/** @} */ /** @} */
#endif // #ifdef SHARED_PTR_NAMESPACE
} }
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment