From 41d1cb863cf1d86fc55867f91baba8cf79272fc3 Mon Sep 17 00:00:00 2001 From: Axel Menzel Date: Fri, 2 Feb 2018 11:49:24 +0100 Subject: [PATCH] fixed error message for clang on MacOSX The error msg was: _Pragma ("clang diagnostic ignored \"-Wnoexcept-type\"") The version scheme for clang on MacOSX is different then for the other operating systems. The version prior clang 9 on mac did not support this pragma. So we disable it. thx to @gabyx --- src/rttr/detail/base/core_prerequisites.h | 7 +++---- src/rttr/detail/misc/standard_types.cpp | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rttr/detail/base/core_prerequisites.h b/src/rttr/detail/base/core_prerequisites.h index 7f33b001..7962ebca 100644 --- a/src/rttr/detail/base/core_prerequisites.h +++ b/src/rttr/detail/base/core_prerequisites.h @@ -278,12 +278,11 @@ namespace rttr # define RTTR_BEGIN_DISABLE_CONDITIONAL_EXPR_WARNING # define RTTR_END_DISABLE_CONDITIONAL_EXPR_WARNING -#if RTTR_COMP_VER >= 500 - +#if (RTTR_COMP_VER >= 500 && RTTR_PLATFORM != RTTR_PLATFORM_APPLE) || + (RTTR_COMP_VER >= 900 && RTTR_PLATFORM == RTTR_PLATFORM_APPLE) # define RTTR_BEGIN_DISABLE_EXCEPT_TYPE_WARNING _Pragma ("clang diagnostic push") \ _Pragma ("clang diagnostic ignored \"-Wnoexcept-type\"") # define RTTR_END_DISABLE_EXCEPT_TYPE_WARNING _Pragma ("clang diagnostic pop") - #else # define RTTR_BEGIN_DISABLE_EXCEPT_TYPE_WARNING # define RTTR_END_DISABLE_EXCEPT_TYPE_WARNING @@ -303,7 +302,7 @@ namespace rttr # define RTTR_END_DISABLE_EXCEPT_TYPE_WARNING #else -# pragma message("WARNING: ukown compiler, don't know how to disable deprecated warnings") +# pragma message("WARNING: unknown compiler, don't know how to disable deprecated warnings") #endif } // end namespace rttr diff --git a/src/rttr/detail/misc/standard_types.cpp b/src/rttr/detail/misc/standard_types.cpp index e3bea37d..737255d5 100644 --- a/src/rttr/detail/misc/standard_types.cpp +++ b/src/rttr/detail/misc/standard_types.cpp @@ -31,6 +31,7 @@ #include #include #include +#include // explicit instantiation of std::string needed, otherwise we get a linker error with clang on osx // thats a bug in libc++, because of interaction with __attribute__ ((__visibility__("hidden"), __always_inline__)) in std::string