From de777617ffb1c87d37e14d59d47371a1732d2ff3 Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Wed, 13 Jul 2016 22:12:29 +0200 Subject: [PATCH] c++ defines patch: # Recent versions of clang have support for make_unique. # Check if macro "__cpp_lib_experimental_filesystem" is defined and match with the standard value. --- include/nana/c++defines.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/nana/c++defines.hpp b/include/nana/c++defines.hpp index 26ffe63f..bd39a822 100644 --- a/include/nana/c++defines.hpp +++ b/include/nana/c++defines.hpp @@ -118,9 +118,10 @@ // is a known issue on libstdc++, it works on libc++ #define STD_CODECVT_NOT_SUPPORTED - - #ifndef STD_MAKE_UNIQUE_NOT_SUPPORTED - #define STD_MAKE_UNIQUE_NOT_SUPPORTED + #if !defined(__cpp_lib_make_unique) || (__cpp_lib_make_unique != 201304) + #ifndef STD_MAKE_UNIQUE_NOT_SUPPORTED + #define STD_MAKE_UNIQUE_NOT_SUPPORTED + #endif #endif #endif @@ -195,9 +196,9 @@ // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0061r0.html -# if __cpp_lib_experimental_filesystem -# undef STD_FILESYSTEM_NOT_SUPPORTED -# endif +#if defined(__cpp_lib_experimental_filesystem) && (__cpp_lib_experimental_filesystem == 201406) +# undef STD_FILESYSTEM_NOT_SUPPORTED +#endif #ifdef __has_include