#ifndef LYX_SHARED_PTR_H
#define LYX_SHARED_PTR_H
-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+#if __cplusplus >= 201103L
#include <memory>
-
-namespace lyx
-{
- using std::tr1::shared_ptr;
-}
+#define LYX_SHAREDPTR_NS std
#else
#include <boost/shared_ptr.hpp>
+#define LYX_SHAREDPTR_NS boost
+
+#endif
namespace lyx
{
- using boost::shared_ptr;
+ using LYX_SHAREDPTR_NS::shared_ptr;
+ using LYX_SHAREDPTR_NS::const_pointer_cast;
}
-#endif
+#undef LYX_SHAREDPTR_NS
#endif