#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