]> 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 6976a5b4c5483fd3be9248000bcb68a1d7d010e8..bb613de5639f7cf96a0408c05ba75ffd52275fc3 100644 (file)
 #ifndef LYX_SHARED_PTR_H
 #define LYX_SHARED_PTR_H
 
-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+#ifdef LYX_USE_CXX11
 
 #include <memory>
-using std::tr1::shared_ptr;
+#define LYX_SHAREDPTR_NS std
 
 #else
 
 #include <boost/shared_ptr.hpp>
-using boost::shared_ptr;
+#include <boost/make_shared.hpp>
+#define LYX_SHAREDPTR_NS boost
 
 #endif
 
+namespace lyx
+{
+       using LYX_SHAREDPTR_NS::shared_ptr;
+       using LYX_SHAREDPTR_NS::make_shared;
+       using LYX_SHAREDPTR_NS::const_pointer_cast;
+}
+
+#undef LYX_SHAREDPTR_NS
+
 
 #endif