X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=3rdparty%2Fboost%2Fboost%2Fconfig%2Fcompiler%2Fclang.hpp;h=3d893c689ae66ca941f1aa780d5c929233d58343;hb=c40d23deacc277e4a862db803c565ff04e6031f1;hp=47ea65b0a20dfb639dcf374d57b75a7e6f261c8c;hpb=b7a3831289aa542e309d8f645e68d6945f7ca292;p=features.git diff --git a/3rdparty/boost/boost/config/compiler/clang.hpp b/3rdparty/boost/boost/config/compiler/clang.hpp index 47ea65b0a2..3d893c689a 100644 --- a/3rdparty/boost/boost/config/compiler/clang.hpp +++ b/3rdparty/boost/boost/config/compiler/clang.hpp @@ -23,6 +23,14 @@ #define __has_extension __has_feature #endif +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + +#ifndef __has_cpp_attribute +#define __has_cpp_attribute(x) 0 +#endif + #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif @@ -35,14 +43,25 @@ # define BOOST_NO_TYPEID #endif -#if defined(__int64) && !defined(__GNUC__) +#if !__has_feature(cxx_thread_local) +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif + +#ifdef __is_identifier +#if !__is_identifier(__int64) && !defined(__GNUC__) # define BOOST_HAS_MS_INT64 #endif +#endif + +#if __has_include() +# define BOOST_HAS_STDINT_H +#endif + #define BOOST_HAS_NRVO // Branch prediction hints -#if defined(__has_builtin) +#if !defined (__c2__) && defined(__has_builtin) #if __has_builtin(__builtin_expect) #define BOOST_LIKELY(x) __builtin_expect(x, 1) #define BOOST_UNLIKELY(x) __builtin_expect(x, 0) @@ -53,14 +72,25 @@ #define BOOST_HAS_LONG_LONG // -// We disable this if the compiler is really nvcc as it -// doesn't actually support __int128 as of CUDA_VERSION=5000 +// We disable this if the compiler is really nvcc with C++03 as it +// doesn't actually support __int128 as of CUDA_VERSION=7500 // even though it defines __SIZEOF_INT128__. // See https://svn.boost.org/trac/boost/ticket/10418 +// https://svn.boost.org/trac/boost/ticket/11852 // Only re-enable this for nvcc if you're absolutely sure -// of the circumstances under which it's supported: +// of the circumstances under which it's supported. +// Similarly __SIZEOF_INT128__ is defined when targetting msvc +// compatibility even though the required support functions are absent. // -#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) +#if defined(__CUDACC__) +# if defined(BOOST_GCC_CXX11) +# define BOOST_NVCC_CXX11 +# else +# define BOOST_NVCC_CXX03 +# endif +#endif + +#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER) # define BOOST_HAS_INT128 #endif @@ -68,11 +98,15 @@ // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // -#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) +#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__) +# define BOOST_HAS_DECLSPEC +# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__)) +# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__)) +#else # define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) # define BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) #endif +#define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) // // The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through @@ -92,11 +126,16 @@ // // Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t // -#if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) +#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T #endif +#if defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(__GNUC__) +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_LOG1P +#endif + #if !__has_feature(cxx_constexpr) # define BOOST_NO_CXX11_CONSTEXPR #endif @@ -251,15 +290,45 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif + +#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) +# define BOOST_NO_CXX17_IF_CONSTEXPR +#endif + +// Clang 3.9+ in c++1z +#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L +# define BOOST_NO_CXX17_INLINE_VARIABLES +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + +#if __cplusplus < 201103L +#define BOOST_NO_CXX11_SFINAE_EXPR +#endif + #if __cplusplus < 201400 // All versions with __cplusplus above this value seem to support this: # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif +// +// __builtin_unreachable: +#if defined(__has_builtin) && __has_builtin(__builtin_unreachable) +#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); +#endif + +#if (__clang_major__ == 3) && (__clang_minor__ == 0) +// Apparently a clang bug: +# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#endif +// Clang has supported the 'unused' attribute since the first release. +#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) -// Unused attribute: -#if defined(__GNUC__) && (__GNUC__ >= 4) -# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +// Type aliasing hint. +#if __has_attribute(__may_alias__) +# define BOOST_MAY_ALIAS __attribute__((__may_alias__)) #endif #ifndef BOOST_COMPILER