diff options
Diffstat (limited to 'libstdc++-v3/include')
| -rw-r--r-- | libstdc++-v3/include/bits/ios_base.h | 18 | ||||
| -rw-r--r-- | libstdc++-v3/include/bits/quoted_string.h | 23 | ||||
| -rw-r--r-- | libstdc++-v3/include/bits/regex.tcc | 6 | ||||
| -rw-r--r-- | libstdc++-v3/include/bits/version.def | 9 | ||||
| -rw-r--r-- | libstdc++-v3/include/bits/version.h | 10 | ||||
| -rw-r--r-- | libstdc++-v3/include/precompiled/stdc++.h | 7 | ||||
| -rw-r--r-- | libstdc++-v3/include/std/type_traits | 17 | 
7 files changed, 72 insertions, 18 deletions
diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h index b94b2cd..adc2982 100644 --- a/libstdc++-v3/include/bits/ios_base.h +++ b/libstdc++-v3/include/bits/ios_base.h @@ -56,7 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION    // as permitted (but not required) in the standard, in order to provide    // better type safety in iostream calls.  A side effect is that in C++98    // expressions involving them are not compile-time constants. -  enum _Ios_Fmtflags +  enum __attribute__((__flag_enum__)) _Ios_Fmtflags      {        _S_boolalpha 	= 1L << 0,        _S_dec 		= 1L << 1, @@ -76,9 +76,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION        _S_adjustfield 	= _S_left | _S_right | _S_internal,        _S_basefield 	= _S_dec | _S_oct | _S_hex,        _S_floatfield 	= _S_scientific | _S_fixed, -      _S_ios_fmtflags_end = 1L << 16, -      _S_ios_fmtflags_max = __INT_MAX__, -      _S_ios_fmtflags_min = ~__INT_MAX__ +      _S_ios_fmtflags_end __attribute__((__unused__)) = 1L << 16, +      _S_ios_fmtflags_max __attribute__((__unused__)) = __INT_MAX__, +      _S_ios_fmtflags_min __attribute__((__unused__)) = ~__INT_MAX__      };    _GLIBCXX_NODISCARD _GLIBCXX_CONSTEXPR @@ -176,15 +176,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION    { return __a = __a ^ __b; } -  enum _Ios_Iostate +  enum __attribute__((__flag_enum__)) _Ios_Iostate      {        _S_goodbit 		= 0,        _S_badbit 		= 1L << 0,        _S_eofbit 		= 1L << 1,        _S_failbit		= 1L << 2, -      _S_ios_iostate_end = 1L << 16, -      _S_ios_iostate_max = __INT_MAX__, -      _S_ios_iostate_min = ~__INT_MAX__ +      _S_ios_iostate_end __attribute__((__unused__)) = 1L << 16, +      _S_ios_iostate_max __attribute__((__unused__)) = __INT_MAX__, +      _S_ios_iostate_min __attribute__((__unused__)) = ~__INT_MAX__      };    _GLIBCXX_NODISCARD _GLIBCXX_CONSTEXPR @@ -228,7 +228,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION        _S_beg = 0,        _S_cur = _GLIBCXX_STDIO_SEEK_CUR,        _S_end = _GLIBCXX_STDIO_SEEK_END, -      _S_ios_seekdir_end = 1L << 16 +      _S_ios_seekdir_end __attribute__((__unused__)) = 1L << 16      };  #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/bits/quoted_string.h b/libstdc++-v3/include/bits/quoted_string.h index 3a828d5..9a51aa3 100644 --- a/libstdc++-v3/include/bits/quoted_string.h +++ b/libstdc++-v3/include/bits/quoted_string.h @@ -61,6 +61,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION  	_Quoted_string&  	operator=(_Quoted_string&) = delete; +	// Friends for ADL with module std. +	template<typename _CharT2, typename _Traits> +	friend std::basic_ostream<_CharT2, _Traits>& +	operator<<(std::basic_ostream<_CharT2, _Traits>& __os, +		   const _Quoted_string<const _CharT2*, _CharT2>& __str); + +	template<typename _CharT2, typename _Traits, typename _String2> +	friend std::basic_ostream<_CharT2, _Traits>& +	operator<<(std::basic_ostream<_CharT2, _Traits>& __os, +		   const _Quoted_string<_String2, _CharT2>& __str); + +	template<typename _CharT2, typename _Traits, typename _Alloc> +	friend std::basic_istream<_CharT2, _Traits>& +	operator>>(std::basic_istream<_CharT2, _Traits>& __is, +		   const _Quoted_string<basic_string<_CharT2, _Traits, _Alloc>&, +		   _CharT2>& __str); +  	_String _M_string;  	_CharT _M_delim;  	_CharT _M_escape; @@ -78,6 +95,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION  	_Quoted_string&  	operator=(_Quoted_string&) = delete; +	// Friend for ADL with module std. +	template<typename _CharT2, typename _Traits2, typename _String2> +	friend std::basic_ostream<_CharT2, _Traits2>& +	operator<<(std::basic_ostream<_CharT2, _Traits2>& __os, +		   const _Quoted_string<_String2, _CharT2>& __str); +  	basic_string_view<_CharT, _Traits> _M_string;  	_CharT _M_delim;  	_CharT _M_escape; diff --git a/libstdc++-v3/include/bits/regex.tcc b/libstdc++-v3/include/bits/regex.tcc index a0edf27..48917cd 100644 --- a/libstdc++-v3/include/bits/regex.tcc +++ b/libstdc++-v3/include/bits/regex.tcc @@ -348,11 +348,11 @@ namespace __detail  	{  	  const char __c = static_cast<char>(__ch);  	  const char __max_digit = __radix == 8 ? '7' : '9'; -	  if ('0' <= __ch && __ch <= __max_digit) -	    return __ch - '0'; +	  if ('0' <= __c && __c <= __max_digit) +	    return __c - '0';  	  if (__radix < 16)  	    return -1; -	  switch (__ch) +	  switch (__c)  	  {  	    case 'a':  	    case 'A': diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def index 1bf98f7..29ecf15 100644 --- a/libstdc++-v3/include/bits/version.def +++ b/libstdc++-v3/include/bits/version.def @@ -2191,6 +2191,15 @@ ftms = {    };  }; +ftms = { +  name = is_implicit_lifetime; +  values = { +    v =  202302; +    cxxmin = 23; +    extra_cond = "__has_builtin(__builtin_is_implicit_lifetime)"; +  }; +}; +  // Standard test specifications.  stds[97] = ">= 199711L";  stds[03] = ">= 199711L"; diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h index 66de8b4..5901d27 100644 --- a/libstdc++-v3/include/bits/version.h +++ b/libstdc++-v3/include/bits/version.h @@ -2455,4 +2455,14 @@  #endif /* !defined(__cpp_lib_philox_engine) */  #undef __glibcxx_want_philox_engine +#if !defined(__cpp_lib_is_implicit_lifetime) +# if (__cplusplus >= 202100L) && (__has_builtin(__builtin_is_implicit_lifetime)) +#  define __glibcxx_is_implicit_lifetime 202302L +#  if defined(__glibcxx_want_all) || defined(__glibcxx_want_is_implicit_lifetime) +#   define __cpp_lib_is_implicit_lifetime 202302L +#  endif +# endif +#endif /* !defined(__cpp_lib_is_implicit_lifetime) */ +#undef __glibcxx_want_is_implicit_lifetime +  #undef __glibcxx_want_all diff --git a/libstdc++-v3/include/precompiled/stdc++.h b/libstdc++-v3/include/precompiled/stdc++.h index 636632a..54baed4 100644 --- a/libstdc++-v3/include/precompiled/stdc++.h +++ b/libstdc++-v3/include/precompiled/stdc++.h @@ -29,9 +29,7 @@  // 17.4.1.2 Headers  // C -#ifndef _GLIBCXX_NO_ASSERT -#include <cassert> -#endif +// Don't include cassert, it's not suitable for PCH or header unit.  #include <cctype>  #include <cfloat>  #include <climits> @@ -104,9 +102,6 @@  #if _GLIBCXX_HOSTED  // C -#ifndef _GLIBCXX_NO_ASSERT -#include <cassert> -#endif  #include <cctype>  #include <cerrno>  #include <cfloat> diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 77ebb7e..d28b0773 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -47,6 +47,7 @@  #define __glibcxx_want_is_aggregate  #define __glibcxx_want_is_constant_evaluated  #define __glibcxx_want_is_final +#define __glibcxx_want_is_implicit_lifetime  #define __glibcxx_want_is_invocable  #define __glibcxx_want_is_layout_compatible  #define __glibcxx_want_is_nothrow_convertible @@ -4053,6 +4054,22 @@ template<typename _Ret, typename _Fn, typename... _Args>  # endif  #endif +#ifdef __cpp_lib_is_implicit_lifetime // C++ >= 23 +  /// True if the type is an implicit-lifetime type. +  /// @since C++23 + +  template<typename _Tp> +    struct is_implicit_lifetime +    : bool_constant<__builtin_is_implicit_lifetime(_Tp)> +    { }; + +  /// @ingroup variable_templates +  /// @since C++23 +  template<typename _Tp> +    inline constexpr bool is_implicit_lifetime_v +      = __builtin_is_implicit_lifetime(_Tp); +#endif +  #ifdef __cpp_lib_reference_from_temporary // C++ >= 23 && ref_{converts,constructs}_from_temp    /// True if _Tp is a reference type, a _Up value can be bound to _Tp in    /// direct-initialization, and a temporary object would be bound to  | 
