Mercurial > hg > CbC > CbC_gcc
diff libstdc++-v3/include/bits/c++config @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line diff
--- a/libstdc++-v3/include/bits/c++config Thu Oct 25 07:37:49 2018 +0900 +++ b/libstdc++-v3/include/bits/c++config Thu Feb 13 11:34:05 2020 +0900 @@ -1,6 +1,6 @@ // Predefined symbols and macros -*- C++ -*- -// Copyright (C) 1997-2018 Free Software Foundation, Inc. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -78,6 +78,7 @@ // _GLIBCXX_USE_DEPRECATED // _GLIBCXX_DEPRECATED // _GLIBCXX17_DEPRECATED +// _GLIBCXX20_DEPRECATED( string-literal ) #ifndef _GLIBCXX_USE_DEPRECATED # define _GLIBCXX_USE_DEPRECATED 1 #endif @@ -94,11 +95,25 @@ # define _GLIBCXX17_DEPRECATED #endif +#if defined(__DEPRECATED) && (__cplusplus > 201703L) +# define _GLIBCXX20_DEPRECATED(MSG) [[deprecated(MSG)]] +#else +# define _GLIBCXX20_DEPRECATED(MSG) +#endif + // Macros for ABI tag attributes. #ifndef _GLIBCXX_ABI_TAG_CXX11 # define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ ("cxx11"))) #endif +// Macro to warn about unused results. +#if __cplusplus >= 201703L +# define _GLIBCXX_NODISCARD [[__nodiscard__]] +#else +# define _GLIBCXX_NODISCARD +#endif + + #if __cplusplus @@ -149,12 +164,12 @@ #ifndef _GLIBCXX_NOEXCEPT # if __cplusplus >= 201103L # define _GLIBCXX_NOEXCEPT noexcept -# define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND) +# define _GLIBCXX_NOEXCEPT_IF(...) noexcept(__VA_ARGS__) # define _GLIBCXX_USE_NOEXCEPT noexcept # define _GLIBCXX_THROW(_EXC) # else # define _GLIBCXX_NOEXCEPT -# define _GLIBCXX_NOEXCEPT_IF(_COND) +# define _GLIBCXX_NOEXCEPT_IF(...) # define _GLIBCXX_USE_NOEXCEPT throw() # define _GLIBCXX_THROW(_EXC) throw(_EXC) # endif @@ -199,7 +214,6 @@ { namespace __debug { } namespace __parallel { } - namespace __profile { } namespace __cxx1998 { } namespace __detail { @@ -317,9 +331,8 @@ # define _GLIBCXX_END_NAMESPACE_VERSION #endif -// Inline namespaces for special modes: debug, parallel, profile. -#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) \ - || defined(_GLIBCXX_PROFILE) +// Inline namespaces for special modes: debug, parallel. +#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) namespace std { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -343,23 +356,12 @@ # ifdef _GLIBCXX_PARALLEL inline namespace __parallel { } # endif - - // Inline namespaces for profile mode -# ifdef _GLIBCXX_PROFILE - inline namespace __profile { } -# endif } // Check for invalid usage and unsupported mixed-mode use. # if defined(_GLIBCXX_DEBUG) && defined(_GLIBCXX_PARALLEL) # error illegal use of multiple inlined namespaces # endif -# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_DEBUG) -# error illegal use of multiple inlined namespaces -# endif -# if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_PARALLEL) -# error illegal use of multiple inlined namespaces -# endif // Check for invalid use due to lack for weak symbols. # if __NO_INLINE__ && !__GXX_WEAK__ @@ -378,7 +380,7 @@ // _GLIBCXX_END_NAMESPACE_ALGO // _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // _GLIBCXX_END_NAMESPACE_CONTAINER -#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE) +#if defined(_GLIBCXX_DEBUG) # define _GLIBCXX_STD_C __cxx1998 # define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \ namespace _GLIBCXX_STD_C { @@ -617,6 +619,17 @@ # endif #endif +// Unless explicitly specified, enable char8_t extensions only if the core +// language char8_t feature macro is defined. +#ifndef _GLIBCXX_USE_CHAR8_T +# ifdef __cpp_char8_t +# define _GLIBCXX_USE_CHAR8_T 1 +# endif +#endif +#ifdef _GLIBCXX_USE_CHAR8_T +# define __cpp_lib_char8_t 201907L +#endif + /* Define if __float128 is supported on this host. */ #if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__) #define _GLIBCXX_USE_FLOAT128 @@ -627,7 +640,11 @@ # define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1 # define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 # define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1 -#elif defined(__is_identifier) +# define _GLIBCXX_BUILTIN_IS_SAME_AS(T, U) __is_same_as(T, U) +# if __GNUC__ >= 9 +# define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 1 +# endif +#elif defined(__is_identifier) && defined(__has_builtin) // For non-GNU compilers: # if ! __is_identifier(__has_unique_object_representations) # define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1 @@ -635,9 +652,41 @@ # if ! __is_identifier(__is_aggregate) # define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 # endif -# if ! __is_identifier(__builtin_launder) +# if __has_builtin(__builtin_launder) # define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1 # endif +# if __has_builtin(__builtin_is_constant_evaluated) +# define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 1 +# endif +# if ! __is_identifier(__is_same) +# define _GLIBCXX_BUILTIN_IS_SAME_AS(T, U) __is_same(T, U) +# endif #endif // GCC +// PSTL configuration + +#if __cplusplus >= 201703L +// This header is not installed for freestanding: +#if __has_include(<pstl/pstl_config.h>) +// Preserved here so we have some idea which version of upstream we've pulled in +// #define PSTL_VERSION 9000 + +// For now this defaults to being based on the presence of Thread Building Blocks +# ifndef _GLIBCXX_USE_TBB_PAR_BACKEND +# define _GLIBCXX_USE_TBB_PAR_BACKEND __has_include(<tbb/tbb.h>) +# endif +// This section will need some rework when a new (default) backend type is added +# if _GLIBCXX_USE_TBB_PAR_BACKEND +# define _PSTL_PAR_BACKEND_TBB +# else +# define _PSTL_PAR_BACKEND_SERIAL +# endif + +# define _PSTL_ASSERT(_Condition) __glibcxx_assert(_Condition) +# define _PSTL_ASSERT_MSG(_Condition, _Message) __glibcxx_assert(_Condition) + +#include <pstl/pstl_config.h> +#endif // __has_include +#endif // C++17 + // End of prewritten config; the settings discovered at configure time follow.