Added shared_ptr handling for C++03 mode.
This commit is contained in:
parent
4f49c978cf
commit
f3dfc0349d
@ -270,11 +270,15 @@ template class SizeChecker<UInt16, 2>;
|
|||||||
// Allow both Older versions of MSVC and newer versions of everything use a shared_ptr:
|
// 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.
|
// Note that we cannot typedef, because C++ doesn't allow (partial) templates to be typedeffed.
|
||||||
#if (defined(_MSC_VER) && (_MSC_VER < 1600))
|
#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
|
#define SharedPtr std::tr1::shared_ptr
|
||||||
#else
|
#elif (__cplusplus > 201103L)
|
||||||
// All others have std::shared ptr
|
// C++11 has std::shared_ptr in <memory>, included earlier
|
||||||
#define SharedPtr std::shared_ptr
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user