From a47fadcc5a3da9072c74eb3a399cd786c71bc756 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Wed, 20 Sep 2017 13:37:04 +0900 Subject: [PATCH] workaround for clang 5.0.0 C++17 mode (nothing auto_ptr) --- README.rst | 4 ++-- sprout/memory/get_pointer.hpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index dfff556c..698a310f 100644 --- a/README.rst +++ b/README.rst @@ -35,8 +35,8 @@ Supported Compilers Linux: -* GCC, C++11/14/17(1z) mode: 4.7.0~4.7.4, 4.8.0~4.8.5, 4.9.0~4.9.4, 5.1.0~5.4.0, 6.1.0~6.4.0, 7.1.0 -* Clang, C++11/14/17(1z) mode: 3.2, 3.3, 3.4~3.4.2, 3.5.0~3.5.1, 3.6.0~3.6.2, 3.7.0~3.7.1, 3.8.0~3.8.1, 3.9.0~3.9.1, 4.0.0~4.0.1 +* GCC, C++11/14/17(1z) mode: 4.7.0~4.7.4, 4.8.0~4.8.5, 4.9.0~4.9.4, 5.1.0~5.4.0, 6.1.0~6.4.0, 7.1.0~7.2.0 +* Clang, C++11/14/17(1z) mode: 3.2, 3.3, 3.4~3.4.2, 3.5.0~3.5.1, 3.6.0~3.6.2, 3.7.0~3.7.1, 3.8.0~3.8.1, 3.9.0~3.9.1, 4.0.0~4.0.1, 5.0.0 ******************************************************************************* Author diff --git a/sprout/memory/get_pointer.hpp b/sprout/memory/get_pointer.hpp index 037397a3..9976378d 100644 --- a/sprout/memory/get_pointer.hpp +++ b/sprout/memory/get_pointer.hpp @@ -21,11 +21,13 @@ namespace sprout { return p; } +#if !SPROUT_CLANG_OR_LATER(5, 0, 0) || (_LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)) template inline SPROUT_NON_CONSTEXPR T* get_pointer(std::auto_ptr const& p) SPROUT_NOEXCEPT { return p.get(); } +#endif #if !defined(SPROUT_NO_CXX11_SMART_PTR) template