From 4ef7db20f8cf63a64120c58eab25462eae6a35dd Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 12 Jul 2018 15:38:32 -0700 Subject: [PATCH] sharePtr.h: adjust apply/llvm compatibility --- src/misc/pv/sharedPtr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc/pv/sharedPtr.h b/src/misc/pv/sharedPtr.h index 3fba962..5bc968a 100644 --- a/src/misc/pv/sharedPtr.h +++ b/src/misc/pv/sharedPtr.h @@ -62,9 +62,9 @@ #if defined(SHARED_FROM_MANUAL) // define SHARED_FROM_MANUAL if from some reason it is desirable to manually select // which shared_ptr implementation to use -#elif __cplusplus>=201103L || (defined(_MSC_VER) && (_MSC_VER>=1600)) || (__clang__ && __APPLE__) -// c++11 or MSVC 2010 -// clang on linux has tr1/memory, clang on OSX doesn't +#elif __cplusplus>=201103L || (defined(_MSC_VER) && (_MSC_VER>=1600)) || defined(_LIBCPP_VERSION) +// MSVC has been bad about incrementing __cplusplus, even when new features are added. shared_ptr from MSVC 2010 +// the llvm libc++ doesn't bother with tr1, and puts shared_ptr in std:: even with -std=c++98 # define SHARED_FROM_STD #elif defined(__GNUC__) && __GNUC__>=4 && !defined(vxWorks)