summaryrefslogtreecommitdiffstats
path: root/src/Globals.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-25 09:48:52 +0200
committermadmaxoft <github@xoft.cz>2014-04-25 09:48:52 +0200
commitf3dfc0349d7008efa50855c739d86918bdbf4a88 (patch)
tree1db49f61c54f4a4b9b317687b4871f854ca5a2e9 /src/Globals.h
parentReplaced MSVC-specific decorators with our universal ones. (diff)
downloadcuberite-f3dfc0349d7008efa50855c739d86918bdbf4a88.tar
cuberite-f3dfc0349d7008efa50855c739d86918bdbf4a88.tar.gz
cuberite-f3dfc0349d7008efa50855c739d86918bdbf4a88.tar.bz2
cuberite-f3dfc0349d7008efa50855c739d86918bdbf4a88.tar.lz
cuberite-f3dfc0349d7008efa50855c739d86918bdbf4a88.tar.xz
cuberite-f3dfc0349d7008efa50855c739d86918bdbf4a88.tar.zst
cuberite-f3dfc0349d7008efa50855c739d86918bdbf4a88.zip
Diffstat (limited to '')
-rw-r--r--src/Globals.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Globals.h b/src/Globals.h
index 2e7e0c9cf..93baf69ea 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -270,11 +270,15 @@ template class SizeChecker<UInt16, 2>;
// Allow both Older versions of MSVC and newer versions of everything use a shared_ptr:
// Note that we cannot typedef, because C++ doesn't allow (partial) templates to be typedeffed.
#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- // MSVC before 2010 doesn't have std::shared_ptr, but has std::tr1::shared_ptr
+ // MSVC before 2010 doesn't have std::shared_ptr, but has std::tr1::shared_ptr, defined in <memory> included earlier
#define SharedPtr std::tr1::shared_ptr
-#else
- // All others have std::shared ptr
+#elif (__cplusplus > 201103L)
+ // C++11 has std::shared_ptr in <memory>, included earlier
#define SharedPtr std::shared_ptr
+#else
+ // C++03 has std::tr1::shared_ptr in <tr1/memory>
+ #include <tr1/memory>
+ #define SharedPtr std::tr1::shared_ptr
#endif