diff options
Diffstat (limited to 'libstdc++-v3/include/std')
| -rw-r--r-- | libstdc++-v3/include/std/regex | 1 | ||||
| -rw-r--r-- | libstdc++-v3/include/std/tuple | 53 | ||||
| -rw-r--r-- | libstdc++-v3/include/std/type_traits | 17 | 
3 files changed, 63 insertions, 8 deletions
| diff --git a/libstdc++-v3/include/std/regex b/libstdc++-v3/include/std/regex index 0223066..9121d26 100644 --- a/libstdc++-v3/include/std/regex +++ b/libstdc++-v3/include/std/regex @@ -41,7 +41,6 @@  #include <bitset>  #include <locale> -#include <sstream>  #include <stack>  #include <stdexcept>  #include <string> diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index c064a92..d4db125 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -1984,14 +1984,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION      class tuple<>      {      public: +      // We need the default since we're going to define no-op +      // allocator constructors. +      tuple() = default; +      // Defaulted copy operations to maintain trivial copyability. +      // and support non-const assignment expressions. +      tuple(const tuple&) = default; +      tuple& operator=(const tuple&) = default; +        _GLIBCXX20_CONSTEXPR        void swap(tuple&) noexcept { /* no-op */ } +  #if __cpp_lib_ranges_zip // >= C++23 -      constexpr void swap(const tuple&) const noexcept { /* no-op */ } +      template<same_as<tuple> _Tuple = tuple> +      constexpr const tuple& +      operator=(const _Tuple&) const noexcept +      { return *this; } + +      constexpr void swap(const tuple&) const noexcept +      { /* no-op */ }  #endif -      // We need the default since we're going to define no-op -      // allocator constructors. -      tuple() = default; +        // No-op allocator constructors.        template<typename _Alloc>  	_GLIBCXX20_CONSTEXPR @@ -2001,16 +2014,42 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION  	tuple(allocator_arg_t, const _Alloc&, const tuple&) noexcept { }  #if __cpp_lib_tuple_like // >= C++23 -      // Comparison operators for tuple<> with other empty tuple-like types        template<__tuple_like _UTuple> -	requires (!__is_tuple_v<_UTuple> && tuple_size_v<_UTuple> == 0) +	requires (!is_same_v<remove_cvref_t<_UTuple>, tuple>) +		  && (!is_same_v<remove_cvref_t<_UTuple>, allocator_arg_t>) +		  && (tuple_size_v<remove_cvref_t<_UTuple>> == 0) +      constexpr +      tuple(_UTuple&&) noexcept { } + +      template<typename _Alloc, __tuple_like _UTuple> +	requires (!is_same_v<remove_cvref_t<_UTuple>, tuple>) +		  && (tuple_size_v<remove_cvref_t<_UTuple>> == 0) +      constexpr +      tuple(allocator_arg_t, const _Alloc&, _UTuple&&) noexcept { } + +      template<__tuple_like _UTuple> +	requires (!is_same_v<remove_cvref_t<_UTuple>, tuple>) +		  && (tuple_size_v<remove_cvref_t<_UTuple>> == 0) +      constexpr tuple& +      operator=(_UTuple&&) noexcept +      { return *this; } + +      template<__tuple_like _UTuple> +	requires (!is_same_v<remove_cvref_t<_UTuple>, tuple>) +		  && (tuple_size_v<remove_cvref_t<_UTuple>> == 0) +      constexpr const tuple& +      operator=(_UTuple&&) const noexcept +      { return *this; } + +      template<__tuple_like _UTuple> +	requires (!__is_tuple_v<_UTuple>) && (tuple_size_v<_UTuple> == 0)        [[nodiscard]]        friend constexpr bool        operator==(const tuple&, const _UTuple&) noexcept        { return true; }        template<__tuple_like _UTuple> -	requires (!__is_tuple_v<_UTuple> && tuple_size_v<_UTuple> == 0) +	requires (!__is_tuple_v<_UTuple>) && (tuple_size_v<_UTuple> == 0)        friend constexpr strong_ordering        operator<=>(const tuple&, const _UTuple&) noexcept        { return strong_ordering::equal; } 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 | 
