next try, seems to be in a different namespace; refs #11

master
Marc Wäckerlin 10 years ago
parent 10a4170f62
commit 6850c70b69
  1. 14
      src/mrw/checkcxx11.hxx

@ -8,8 +8,6 @@
#ifndef __MRW__CHECKCXX11__
#define __MRW__CHECKCXX11__
# include <memory>
// 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 <tr1/memory>
# 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 <tr1/memory>
namespace std {
// there is no std::shared_ptr in apple, but
// std::tr1::shared_ptr in <tr1/memory>
template <typename T> class shared_ptr: public tr1::shared_ptr<T> {
public:
explicit shared_ptr(): boost::shared_ptr<T>() {}
explicit shared_ptr(T* p): boost::shared_ptr<T>(p) {}
};
}
# endif
#endif

Loading…
Cancel
Save