From 6850c70b695449d2723050850fa6feea8251b338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 12 Sep 2014 14:19:57 +0000 Subject: [PATCH] next try, seems to be in a different namespace; refs #11 --- src/mrw/checkcxx11.hxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/mrw/checkcxx11.hxx b/src/mrw/checkcxx11.hxx index 63ba99d..95c9bb3 100644 --- a/src/mrw/checkcxx11.hxx +++ b/src/mrw/checkcxx11.hxx @@ -8,8 +8,6 @@ #ifndef __MRW__CHECKCXX11__ #define __MRW__CHECKCXX11__ -# include - // check if code is compiled with a new C++11 compiler // otherwise there is a fallback wich makes everything much more compliacted # ifndef MRW__OLD_PRE11_COMPILER @@ -24,7 +22,6 @@ when support for C++11 is more common. Only rely on this workaround, if you really have to. Mac gcc is even worse than on other systems. */ -# include # define MRW__OLD_PRE11_COMPILER # warning you need a C++11 compliant compiler, on gcc: add -std=c++11 # warning emulating C++11 - this changes the way you use the library @@ -70,6 +67,17 @@ namespace std { }; }; # endif +# elsif __APPLE__ +# include + namespace std { + // there is no std::shared_ptr in apple, but + // std::tr1::shared_ptr in + template class shared_ptr: public tr1::shared_ptr { + public: + explicit shared_ptr(): boost::shared_ptr() {} + explicit shared_ptr(T* p): boost::shared_ptr(p) {} + }; + } # endif #endif