#ifndef CROSSPLATFORM_SHARED_PTR #define CROSSPLATFORM_SHARED_PTR #include "PlatformDetermination.h" // Based on the platform and compiler, include the necessary header to give access to std::tr1::shared_ptr directly as shared_ptr #if defined(__ANDROID__) #include using std::shared_ptr; #elif defined(__ISLINUX__) && (defined(__llvm__) || defined(__clang__)) // CLANG #if __has_include() // CLANG and -stdlib=libstdc++ // See also http://stackoverflow.com/questions/13445742/apple-and-shared-ptr #include using namespace std::tr1; #else // CLANG and -stdlib=libc++ #include using std::shared_ptr; #endif #elif defined(__ISLINUX__) // GCC #include using namespace std::tr1; #elif defined(__ISAPPLE__) && (defined(__llvm__) || defined(__clang__)) // CLANG // See docs for clang: http://clang.llvm.org/docs/LanguageExtensions.html#include-file-checking-macros #if __has_include() // CLANG and -stdlib=libstdc++ // See also http://stackoverflow.com/questions/13445742/apple-and-shared-ptr #include using namespace std::tr1; #else // CLANG and -stdlib=libc++ #include using std::shared_ptr; #endif #elif defined(__GNUC__) #include using namespace std::tr1; #elif defined(__ISWINDOWS__) && defined(__MINGW32__) #include using namespace std::tr1; #elif defined(__ISWINDOWS__) && !defined(__MINGW32__) #include using namespace std::tr1; #else #pragma error #endif #endif