next try, seems to be in a different namespace; refs #11
This commit is contained in:
@@ -8,8 +8,6 @@
|
|||||||
#ifndef __MRW__CHECKCXX11__
|
#ifndef __MRW__CHECKCXX11__
|
||||||
#define __MRW__CHECKCXX11__
|
#define __MRW__CHECKCXX11__
|
||||||
|
|
||||||
# include <memory>
|
|
||||||
|
|
||||||
// check if code is compiled with a new C++11 compiler
|
// check if code is compiled with a new C++11 compiler
|
||||||
// otherwise there is a fallback wich makes everything much more compliacted
|
// otherwise there is a fallback wich makes everything much more compliacted
|
||||||
# ifndef MRW__OLD_PRE11_COMPILER
|
# ifndef MRW__OLD_PRE11_COMPILER
|
||||||
@@ -24,7 +22,6 @@
|
|||||||
when support for C++11 is more common. Only rely on
|
when support for C++11 is more common. Only rely on
|
||||||
this workaround, if you really have to.
|
this workaround, if you really have to.
|
||||||
Mac gcc is even worse than on other systems. */
|
Mac gcc is even worse than on other systems. */
|
||||||
# include <tr1/memory>
|
|
||||||
# define MRW__OLD_PRE11_COMPILER
|
# define MRW__OLD_PRE11_COMPILER
|
||||||
# warning you need a C++11 compliant compiler, on gcc: add -std=c++11
|
# 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
|
# warning emulating C++11 - this changes the way you use the library
|
||||||
@@ -70,6 +67,17 @@ namespace std {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
# endif
|
# 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
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user