]> git.lyx.org Git - lyx.git/blobdiff - src/support/shared_ptr.h
Fix bugs #6078 and #9364
[lyx.git] / src / support / shared_ptr.h
index 454360ee4c3af77203f05b19e9bc6bb4a0bc291c..bb613de5639f7cf96a0408c05ba75ffd52275fc3 100644 (file)
 #ifndef LYX_SHARED_PTR_H
 #define LYX_SHARED_PTR_H
 
-#include "checktr1.h"
-
-
-#ifdef LYX_USE_TR1
+#ifdef LYX_USE_CXX11
 
 #include <memory>
-
-#ifdef __GNUC__
-#include <tr1/memory>
-#endif
-
-namespace lyx
-{
-       using std::tr1::shared_ptr;
-}
+#define LYX_SHAREDPTR_NS std
 
 #else
 
 #include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+#define LYX_SHAREDPTR_NS boost
+
+#endif
 
 namespace lyx
 {
-       using boost::shared_ptr;
+       using LYX_SHAREDPTR_NS::shared_ptr;
+       using LYX_SHAREDPTR_NS::make_shared;
+       using LYX_SHAREDPTR_NS::const_pointer_cast;
 }
 
-#endif
+#undef LYX_SHAREDPTR_NS
 
 
 #endif