4 changes: 2 additions & 2 deletions libcxx/include/__format/format_args.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _Context>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_args {
Expand Down Expand Up @@ -73,7 +73,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_args {
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_format_args);

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/format_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _OutIt, class _CharT>
requires output_iterator<_OutIt, const _CharT&>
Expand Down Expand Up @@ -216,7 +216,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT
};

_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_format_context);
#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/format_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

class _LIBCPP_EXCEPTION_ABI format_error : public runtime_error {
public:
Expand Down Expand Up @@ -48,7 +48,7 @@ __throw_format_error(const char* __s) {
#endif
}

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/format_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// TODO FMT Evaluate which templates should be external templates. This
// improves the efficiency of the header. However since the header is still
Expand Down Expand Up @@ -657,7 +657,7 @@ formatted_size(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args)
#endif // _LIBCPP_HAS_NO_LOCALIZATION


#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/format_fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _Context>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_arg;
Expand All @@ -32,7 +32,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_context;
template <class _Tp, class _CharT = char>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter;

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/format_parse_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _CharT>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_parse_context {
Expand Down Expand Up @@ -93,7 +93,7 @@ using format_parse_context = basic_format_parse_context<char>;
using wformat_parse_context = basic_format_parse_context<wchar_t>;
#endif

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/format_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace __format {

Expand Down Expand Up @@ -160,7 +160,7 @@ __parse_arg_id(_Iterator __begin, _Iterator __end, auto& __parse_ctx) {

} // namespace __format

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/format_to_n_result.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _OutIt>
struct _LIBCPP_TEMPLATE_VIS format_to_n_result {
Expand All @@ -28,7 +28,7 @@ struct _LIBCPP_TEMPLATE_VIS format_to_n_result {
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(format_to_n_result);

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/__format/formatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

/// The default formatter template.
///
Expand All @@ -38,16 +38,16 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter {
formatter& operator=(const formatter&) = delete;
};

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23

template <class _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr void __set_debug_format(_Tp& __formatter) {
if constexpr (requires { __formatter.set_debug_format(); })
__formatter.set_debug_format();
}

# endif // _LIBCPP_STD_VER > 20
#endif // _LIBCPP_STD_VER > 17
# endif // _LIBCPP_STD_VER >= 23
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/formatter_bool.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<bool, _CharT> {
Expand Down Expand Up @@ -71,7 +71,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<bool, _CharT>
__format_spec::__parser<_CharT> __parser_;
};

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/__format/formatter_char.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_char {
Expand All @@ -44,7 +44,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_char {
if (__parser_.__type_ == __format_spec::__type::__default || __parser_.__type_ == __format_spec::__type::__char)
return __formatter::__format_char(__value, __ctx.out(), __parser_.__get_parsed_std_specifications(__ctx));

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
if (__parser_.__type_ == __format_spec::__type::__debug)
return __formatter::__format_escaped_char(__value, __ctx.out(), __parser_.__get_parsed_std_specifications(__ctx));
# endif
Expand All @@ -66,7 +66,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_char {
return format(static_cast<wchar_t>(__value), __ctx);
}

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
_LIBCPP_HIDE_FROM_ABI constexpr void set_debug_format() { __parser_.__type_ = __format_spec::__type::__debug; }
# endif

Expand All @@ -86,7 +86,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<wchar_t, wchar

# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/formatter_floating_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ _LIBCPP_PUSH_MACROS

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace __formatter {

Expand Down Expand Up @@ -748,7 +748,7 @@ template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long double, _CharT>
: public __formatter_floating_point<_CharT> {};

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/formatter_integer.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_integer {
Expand Down Expand Up @@ -100,7 +100,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<__uint128_t, _
: public __formatter_integer<_CharT> {};
# endif

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/formatter_integral.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ _LIBCPP_PUSH_MACROS

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace __formatter {

Expand Down Expand Up @@ -354,7 +354,7 @@ __format_bool(bool __value, auto& __ctx, __format_spec::__parsed_specifications<

} // namespace __formatter

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/__format/formatter_output.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace __formatter {

Expand Down Expand Up @@ -384,7 +384,7 @@ _LIBCPP_HIDE_FROM_ABI auto __write_string(
return __formatter::__write(__str.begin(), __str.end(), _VSTD::move(__out_it), __specs, __size);
}

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23

struct __nul_terminator {};

Expand Down Expand Up @@ -561,11 +561,11 @@ __format_escaped_string(basic_string_view<_CharT> __values,
return __formatter::__write_string(basic_string_view{__str}, _VSTD::move(__out_it), __specs);
}

# endif // _LIBCPP_STD_VER > 20
# endif // _LIBCPP_STD_VER >= 23

} // namespace __formatter

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/formatter_pointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS __formatter_pointer {
Expand Down Expand Up @@ -66,7 +66,7 @@ template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const void*, _CharT>
: public __formatter_pointer<_CharT> {};

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
10 changes: 5 additions & 5 deletions libcxx/include/__format/formatter_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <__fmt_char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS __formatter_string {
Expand All @@ -40,15 +40,15 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_string {
}

_LIBCPP_HIDE_FROM_ABI auto format(basic_string_view<_CharT> __str, auto& __ctx) const -> decltype(__ctx.out()) {
# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
if (__parser_.__type_ == __format_spec::__type::__debug)
return __formatter::__format_escaped_string(__str, __ctx.out(), __parser_.__get_parsed_std_specifications(__ctx));
# endif

return __formatter::__write_string(__str, __ctx.out(), __parser_.__get_parsed_std_specifications(__ctx));
}

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
_LIBCPP_HIDE_FROM_ABI constexpr void set_debug_format() { __parser_.__type_ = __format_spec::__type::__debug; }
# endif

Expand All @@ -66,7 +66,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT*,
"prevented an invalid pointer.");

__format_spec::__parsed_specifications<_CharT> __specs = _Base::__parser_.__get_parsed_std_specifications(__ctx);
# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
if (_Base::__parser_.__type_ == __format_spec::__type::__debug)
return __formatter::__format_escaped_string(basic_string_view<_CharT>{__str}, __ctx.out(), __specs);
# endif
Expand Down Expand Up @@ -152,7 +152,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string_v
}
};

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/formatter_tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 20
#if _LIBCPP_STD_VER >= 23

template <__fmt_char_type _CharT, class _Tuple, formattable<_CharT>... _Args>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_tuple {
Expand Down Expand Up @@ -171,7 +171,7 @@ template <__fmt_char_type _CharT, formattable<_CharT>... _Args>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<tuple<_Args...>, _CharT>
: public __formatter_tuple<_CharT, tuple<_Args...>, _Args...> {};

#endif //_LIBCPP_STD_VER > 20
#endif //_LIBCPP_STD_VER >= 23

_LIBCPP_END_NAMESPACE_STD

Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/__format/parser_std_format_spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ _LIBCPP_PUSH_MACROS

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace __format_spec {

Expand Down Expand Up @@ -140,7 +140,7 @@ inline constexpr __fields __fields_floating_point{
inline constexpr __fields __fields_string{.__precision_ = true, .__type_ = true};
inline constexpr __fields __fields_pointer{.__type_ = true};

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
inline constexpr __fields __fields_tuple{.__type_ = false, .__allow_colon_in_fill_ = true};
inline constexpr __fields __fields_range{.__type_ = false, .__allow_colon_in_fill_ = true};
# endif
Expand Down Expand Up @@ -582,7 +582,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
case 'x':
__type_ = __type::__hexadecimal_lower_case;
break;
# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
case '?':
__type_ = __type::__debug;
break;
Expand Down Expand Up @@ -959,7 +959,7 @@ __estimate_column_width(basic_string_view<_CharT> __str, size_t __maximum, __col

} // namespace __format_spec

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/range_default_formatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 20
#if _LIBCPP_STD_VER >= 23

template <class _Rp, class _CharT>
concept __const_formattable_range =
Expand Down Expand Up @@ -194,7 +194,7 @@ template <ranges::input_range _Rp, class _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_Rp, _CharT>
: __range_default_formatter<format_kind<_Rp>, _Rp, _CharT> {};

#endif //_LIBCPP_STD_VER > 20
#endif //_LIBCPP_STD_VER >= 23

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__format/range_formatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 20
#if _LIBCPP_STD_VER >= 23

template <class _Tp, class _CharT = char>
requires same_as<remove_cvref_t<_Tp>, _Tp> && formattable<_Tp, _CharT>
Expand Down Expand Up @@ -249,7 +249,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT range_formatter {
basic_string_view<_CharT> __closing_bracket_ = _LIBCPP_STATICALLY_WIDEN(_CharT, "]");
};

#endif //_LIBCPP_STD_VER > 20
#endif //_LIBCPP_STD_VER >= 23

_LIBCPP_END_NAMESPACE_STD

Expand Down
20 changes: 10 additions & 10 deletions libcxx/include/__format/unicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace __unicode {

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23

/// The result of consuming a code point using P2286' semantics
///
Expand All @@ -47,7 +47,7 @@ struct __consume_p2286_result {
char32_t __value;
};

# endif // _LIBCPP_STD_VER > 20
# endif // _LIBCPP_STD_VER >= 23

# ifndef _LIBCPP_HAS_NO_UNICODE

Expand Down Expand Up @@ -150,7 +150,7 @@ class __code_point_view<char> {
return __replacement_character;
}

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
_LIBCPP_HIDE_FROM_ABI constexpr __consume_p2286_result __consume_p2286() noexcept {
_LIBCPP_ASSERT(__first_ != __last_, "can't move beyond the end of input");

Expand Down Expand Up @@ -212,7 +212,7 @@ class __code_point_view<char> {
// "in sync" after a few code units.
return {1, static_cast<unsigned char>(*__first_++)};
}
# endif // _LIBCPP_STD_VER > 20
# endif // _LIBCPP_STD_VER >= 23

private:
_Iterator __first_;
Expand Down Expand Up @@ -273,7 +273,7 @@ class __code_point_view<wchar_t> {
}
}

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
_LIBCPP_HIDE_FROM_ABI constexpr __consume_p2286_result __consume_p2286() noexcept {
_LIBCPP_ASSERT(__first_ != __last_, "can't move beyond the end of input");

Expand All @@ -299,7 +299,7 @@ class __code_point_view<wchar_t> {

return {0, __result};
}
# endif // _LIBCPP_STD_VER > 20
# endif // _LIBCPP_STD_VER >= 23

private:
_Iterator __first_;
Expand Down Expand Up @@ -479,13 +479,13 @@ class __code_point_view {
return *__first_++;
}

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
_LIBCPP_HIDE_FROM_ABI constexpr __consume_p2286_result __consume_p2286() noexcept {
_LIBCPP_ASSERT(__first_ != __last_, "can't move beyond the end of input");

return {0, std::make_unsigned_t<_CharT>(*__first_++)};
}
# endif // _LIBCPP_STD_VER > 20
# endif // _LIBCPP_STD_VER >= 23

private:
_Iterator __first_;
Expand All @@ -496,7 +496,7 @@ class __code_point_view {

} // namespace __unicode

#endif //_LIBCPP_STD_VER > 17
#endif //_LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct is_bind_expression : _If<
is_bind_expression<__remove_cvref_t<_Tp> >
> {};

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
inline constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value;
#endif
Expand All @@ -42,7 +42,7 @@ struct is_placeholder : _If<
is_placeholder<__remove_cvref_t<_Tp> >
> {};

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
inline constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value;
#endif
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/bind_back.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <size_t _NBound, class = make_index_sequence<_NBound>>
struct __bind_back_op;
Expand Down Expand Up @@ -57,7 +57,7 @@ constexpr auto __bind_back(_Fn&& __f, _Args&&... __args)
-> decltype( __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)))
{ return __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); }

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/bind_front.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

struct __bind_front_op {
template <class ..._Args>
Expand Down Expand Up @@ -51,7 +51,7 @@ constexpr auto bind_front(_Fn&& __f, _Args&&... __args) {
return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);
}

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/boyer_moore_searcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <unordered_map>
#include <vector>

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

_LIBCPP_PUSH_MACROS
#include <__undef_macros>
Expand Down Expand Up @@ -310,6 +310,6 @@ _LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

#endif // _LIBCPP___FUNCTIONAL_BOYER_MOORE_SEARCHER_H
4 changes: 2 additions & 2 deletions libcxx/include/__functional/compose.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

struct __compose_op {
template<class _Fn1, class _Fn2, class ..._Args>
Expand All @@ -45,7 +45,7 @@ constexpr auto __compose(_Fn1&& __f1, _Fn2&& __f2)
-> decltype( __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2)))
{ return __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2)); }

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/default_searcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

// default searcher
template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
Expand All @@ -50,7 +50,7 @@ class _LIBCPP_TEMPLATE_VIS default_searcher {
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(default_searcher);

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ struct _LIBCPP_TEMPLATE_VIS hash : public __enum_hash<_Tp>
{
};

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <>
struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t>
Expand All @@ -667,7 +667,7 @@ using __has_enabled_hash _LIBCPP_NODEBUG = integral_constant<bool,
is_default_constructible<_Hash>::value
>;

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _Type, class>
using __enable_hash_helper_imp _LIBCPP_NODEBUG = _Type;

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/identity.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct __identity {
using is_transparent = void;
};

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

struct identity {
template<class _Tp>
Expand All @@ -39,7 +39,7 @@ struct identity {

using is_transparent = void;
};
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/invoke.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ struct __invoke_void_return_wrapper<_Ret, true>
}
};

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

// is_invocable

Expand Down Expand Up @@ -539,7 +539,7 @@ invoke(_Fn&& __f, _Args&&... __args)
return _VSTD::__invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);
}

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

#if _LIBCPP_STD_VER >= 23
template <class _Result, class _Fn, class... _Args>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__functional/is_transparent.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14

template <class _Tp, class, class = void>
struct __is_transparent : false_type {};
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/not_fn.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

struct __not_fn_op {
template <class... _Args>
Expand All @@ -47,7 +47,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 auto not_fn(_Fn&& __f) {
return __not_fn_t<decay_t<_Fn>>(_VSTD::forward<_Fn>(__f));
}

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
74 changes: 37 additions & 37 deletions libcxx/include/__functional/operations.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD

// Arithmetic operations

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -38,7 +38,7 @@ struct _LIBCPP_TEMPLATE_VIS plus
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(plus);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS plus<void>
{
Expand All @@ -52,7 +52,7 @@ struct _LIBCPP_TEMPLATE_VIS plus<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -67,7 +67,7 @@ struct _LIBCPP_TEMPLATE_VIS minus
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS minus<void>
{
Expand All @@ -81,7 +81,7 @@ struct _LIBCPP_TEMPLATE_VIS minus<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -96,7 +96,7 @@ struct _LIBCPP_TEMPLATE_VIS multiplies
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS multiplies<void>
{
Expand All @@ -110,7 +110,7 @@ struct _LIBCPP_TEMPLATE_VIS multiplies<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -125,7 +125,7 @@ struct _LIBCPP_TEMPLATE_VIS divides
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS divides<void>
{
Expand All @@ -139,7 +139,7 @@ struct _LIBCPP_TEMPLATE_VIS divides<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -154,7 +154,7 @@ struct _LIBCPP_TEMPLATE_VIS modulus
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS modulus<void>
{
Expand All @@ -168,7 +168,7 @@ struct _LIBCPP_TEMPLATE_VIS modulus<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -183,7 +183,7 @@ struct _LIBCPP_TEMPLATE_VIS negate
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS negate<void>
{
Expand All @@ -199,7 +199,7 @@ struct _LIBCPP_TEMPLATE_VIS negate<void>

// Bitwise operations

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -214,7 +214,7 @@ struct _LIBCPP_TEMPLATE_VIS bit_and
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS bit_and<void>
{
Expand All @@ -228,7 +228,7 @@ struct _LIBCPP_TEMPLATE_VIS bit_and<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
struct _LIBCPP_TEMPLATE_VIS bit_not
: __unary_function<_Tp, _Tp>
Expand All @@ -252,7 +252,7 @@ struct _LIBCPP_TEMPLATE_VIS bit_not<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -267,7 +267,7 @@ struct _LIBCPP_TEMPLATE_VIS bit_or
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS bit_or<void>
{
Expand All @@ -281,7 +281,7 @@ struct _LIBCPP_TEMPLATE_VIS bit_or<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -296,7 +296,7 @@ struct _LIBCPP_TEMPLATE_VIS bit_xor
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS bit_xor<void>
{
Expand All @@ -312,7 +312,7 @@ struct _LIBCPP_TEMPLATE_VIS bit_xor<void>

// Comparison operations

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -327,7 +327,7 @@ struct _LIBCPP_TEMPLATE_VIS equal_to
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS equal_to<void>
{
Expand All @@ -341,7 +341,7 @@ struct _LIBCPP_TEMPLATE_VIS equal_to<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -356,7 +356,7 @@ struct _LIBCPP_TEMPLATE_VIS not_equal_to
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS not_equal_to<void>
{
Expand All @@ -370,7 +370,7 @@ struct _LIBCPP_TEMPLATE_VIS not_equal_to<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -385,7 +385,7 @@ struct _LIBCPP_TEMPLATE_VIS less
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS less<void>
{
Expand All @@ -399,7 +399,7 @@ struct _LIBCPP_TEMPLATE_VIS less<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -414,7 +414,7 @@ struct _LIBCPP_TEMPLATE_VIS less_equal
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS less_equal<void>
{
Expand All @@ -428,7 +428,7 @@ struct _LIBCPP_TEMPLATE_VIS less_equal<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -443,7 +443,7 @@ struct _LIBCPP_TEMPLATE_VIS greater_equal
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS greater_equal<void>
{
Expand All @@ -457,7 +457,7 @@ struct _LIBCPP_TEMPLATE_VIS greater_equal<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -472,7 +472,7 @@ struct _LIBCPP_TEMPLATE_VIS greater
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS greater<void>
{
Expand All @@ -488,7 +488,7 @@ struct _LIBCPP_TEMPLATE_VIS greater<void>

// Logical operations

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -503,7 +503,7 @@ struct _LIBCPP_TEMPLATE_VIS logical_and
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS logical_and<void>
{
Expand All @@ -517,7 +517,7 @@ struct _LIBCPP_TEMPLATE_VIS logical_and<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -532,7 +532,7 @@ struct _LIBCPP_TEMPLATE_VIS logical_not
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS logical_not<void>
{
Expand All @@ -546,7 +546,7 @@ struct _LIBCPP_TEMPLATE_VIS logical_not<void>
};
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
#else
template <class _Tp>
Expand All @@ -561,7 +561,7 @@ struct _LIBCPP_TEMPLATE_VIS logical_or
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or);

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <>
struct _LIBCPP_TEMPLATE_VIS logical_or<void>
{
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/perfect_forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <class _Op, class _Indices, class... _BoundArgs>
struct __perfect_forward_impl;
Expand Down Expand Up @@ -87,7 +87,7 @@ struct __perfect_forward_impl<_Op, index_sequence<_Idx...>, _BoundArgs...> {
template <class _Op, class ..._Args>
using __perfect_forward = __perfect_forward_impl<_Op, index_sequence_for<_Args...>, _Args...>;

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/ranges_operations.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace ranges {

Expand Down Expand Up @@ -93,7 +93,7 @@ struct greater_equal {

} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/reference_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
typename __invoke_of<type&, _ArgTypes...>::type
operator() (_ArgTypes&&... __args) const
#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
// Since is_nothrow_invocable requires C++17 LWG3764 is not backported
// to earlier versions.
noexcept(is_nothrow_invocable_v<_Tp&, _ArgTypes...>)
Expand All @@ -66,7 +66,7 @@ class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp>
}
};

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
reference_wrapper(_Tp&) -> reference_wrapper<_Tp>;
#endif
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__functional/unwrap_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct __unwrap_reference<reference_wrapper<_Tp> > { typedef _LIBCPP_NODEBUG _Tp
template <class _Tp>
struct decay;

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Tp>
struct unwrap_reference : __unwrap_reference<_Tp> { };

Expand All @@ -46,7 +46,7 @@ using unwrap_ref_decay_t = typename unwrap_ref_decay<_Tp>::type;

template <class _Tp>
struct __unwrap_ref_decay
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
: unwrap_ref_decay<_Tp>
#else
: __unwrap_reference<typename decay<_Tp>::type>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__fwd/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _LIBCPP_PUSH_MACROS

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

inline constexpr size_t dynamic_extent = numeric_limits<size_t>::max();
template <typename _Tp, size_t _Extent = dynamic_extent> class span;
Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/__hash_table
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ public:
template <class> friend class __hash_map_node_destructor;
};

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _NodeType, class _Alloc>
struct __generic_container_node_destructor;

Expand Down Expand Up @@ -1121,7 +1121,7 @@ public:
return __emplace_unique_key_args(_NodeTypes::__get_key(__x), __x);
}

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _NodeHandle, class _InsertReturnType>
_LIBCPP_INLINE_VISIBILITY
_InsertReturnType __node_handle_insert_unique(_NodeHandle&& __nh);
Expand Down Expand Up @@ -2088,7 +2088,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi(
return __r;
}

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <class _NodeHandle, class _InsertReturnType>
_LIBCPP_INLINE_VISIBILITY
Expand Down Expand Up @@ -2218,7 +2218,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_merge_multi(
__node_insert_multi_perform(__src_ptr, __pn);
}
}
#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

template <class _Tp, class _Hash, class _Equal, class _Alloc>
template <bool _UniqueKeys>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__iterator/access.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ end(const _Cp& __c) -> decltype(__c.end())
return __c.end();
}

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14

template <class _Cp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/advance.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void advance(_InputIter& __i, _Distance __orig_n) {
_VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// [range.iter.op.advance]

Expand Down Expand Up @@ -196,7 +196,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__iterator/back_insert_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
public:
typedef output_iterator_tag iterator_category;
typedef void value_type;
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
typedef ptrdiff_t difference_type;
#else
typedef void difference_type;
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__iterator/bounded_iter.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct __bounded_iter {
using pointer = typename iterator_traits<_Iterator>::pointer;
using reference = typename iterator_traits<_Iterator>::reference;
using iterator_category = typename iterator_traits<_Iterator>::iterator_category;
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
using iterator_concept = contiguous_iterator_tag;
#endif

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/common_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template<class _Iter>
concept __can_use_postfix_proxy =
Expand Down Expand Up @@ -274,7 +274,7 @@ struct iterator_traits<common_iterator<_Iter, _Sent>> {
using reference = iter_reference_t<_Iter>;
};

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// [iterator.concept.readable]
template<class _In>
Expand Down Expand Up @@ -293,7 +293,7 @@ concept indirectly_copyable_storable =
// Note: indirectly_swappable is located in iter_swap.h to prevent a dependency cycle
// (both iter_swap and indirectly_swappable require indirectly_readable).

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/counted_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template<class>
struct __counted_iterator_concept {};
Expand Down Expand Up @@ -303,7 +303,7 @@ struct iterator_traits<counted_iterator<_Iter>> : iterator_traits<_Iter> {
add_pointer_t<iter_reference_t<_Iter>>, void>;
};

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__iterator/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <class _Cont> constexpr
_LIBCPP_INLINE_VISIBILITY
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/default_sentinel.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

struct default_sentinel_t { };
inline constexpr default_sentinel_t default_sentinel{};

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/distance.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ distance(_InputIter __first, _InputIter __last)
return _VSTD::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// [range.iter.op.distance]

Expand Down Expand Up @@ -101,7 +101,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/empty.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <class _Cont>
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
Expand All @@ -37,7 +37,7 @@ template <class _Ep>
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
constexpr bool empty(initializer_list<_Ep> __il) noexcept { return __il.size() == 0; }

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__iterator/front_insert_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
public:
typedef output_iterator_tag iterator_category;
typedef void value_type;
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
typedef ptrdiff_t difference_type;
#else
typedef void difference_type;
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/incrementable_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// [incrementable.traits]
template<class> struct incrementable_traits {};
Expand Down Expand Up @@ -71,7 +71,7 @@ using iter_difference_t = typename conditional_t<__is_primary_template<iterator_
incrementable_traits<remove_cvref_t<_Ip> >,
iterator_traits<remove_cvref_t<_Ip> > >::difference_type;

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/indirectly_comparable.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _I1, class _I2, class _Rp, class _P1 = identity, class _P2 = identity>
concept indirectly_comparable =
indirect_binary_predicate<_Rp, projected<_I1, _P1>, projected<_I2, _P2>>;

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/insert_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Container>
using __insert_iterator_iter_t = ranges::iterator_t<_Container>;
#else
Expand All @@ -46,7 +46,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
public:
typedef output_iterator_tag iterator_category;
typedef void value_type;
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
typedef ptrdiff_t difference_type;
#else
typedef void difference_type;
Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/__iterator/istream_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
_Tp __value_;
public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istream_iterator() : __in_stream_(nullptr), __value_() {}
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
_LIBCPP_HIDE_FROM_ABI constexpr istream_iterator(default_sentinel_t) : istream_iterator() {}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
_LIBCPP_INLINE_VISIBILITY istream_iterator(istream_type& __s) : __in_stream_(_VSTD::addressof(__s))
{
if (!(*__in_stream_ >> __value_))
Expand All @@ -73,11 +73,11 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
operator==(const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __x,
const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __y);

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
friend _LIBCPP_HIDE_FROM_ABI bool operator==(const istream_iterator& __i, default_sentinel_t) {
return __i.__in_stream_ == nullptr;
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
};

template <class _Tp, class _CharT, class _Traits, class _Distance>
Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/__iterator/istreambuf_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
}
public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(nullptr) {}
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
_LIBCPP_INLINE_VISIBILITY constexpr istreambuf_iterator(default_sentinel_t) noexcept
: istreambuf_iterator() {}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
_LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT
: __sbuf_(__s.rdbuf()) {}
_LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT
Expand All @@ -93,11 +93,11 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
_LIBCPP_INLINE_VISIBILITY bool equal(const istreambuf_iterator& __b) const
{return __test_for_eof() == __b.__test_for_eof();}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
friend _LIBCPP_HIDE_FROM_ABI bool operator==(const istreambuf_iterator& __i, default_sentinel_t) {
return __i.__test_for_eof();
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
};

template <class _CharT, class _Traits>
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/iter_move.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// [iterator.cust.move]

Expand Down Expand Up @@ -97,7 +97,7 @@ template<__dereferenceable _Tp>
requires requires(_Tp& __t) { { ranges::iter_move(__t) } -> __can_reference; }
using iter_rvalue_reference_t = decltype(ranges::iter_move(std::declval<_Tp&>()));

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/iter_swap.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// [iter.cust.swap]

Expand Down Expand Up @@ -106,7 +106,7 @@ concept indirectly_swappable =
ranges::iter_swap(__i2, __i1);
};

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
18 changes: 9 additions & 9 deletions libcxx/include/__iterator/iterator_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _Tp>
using __with_reference = _Tp&;
Expand All @@ -62,7 +62,7 @@ concept __dereferenceable = requires(_Tp& __t) {
template<__dereferenceable _Tp>
using iter_reference_t = decltype(*std::declval<_Tp&>());

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

template <class _Iter>
struct _LIBCPP_TEMPLATE_VIS iterator_traits;
Expand All @@ -72,7 +72,7 @@ struct _LIBCPP_TEMPLATE_VIS output_iterator_tag {};
struct _LIBCPP_TEMPLATE_VIS forward_iterator_tag : public input_iterator_tag {};
struct _LIBCPP_TEMPLATE_VIS bidirectional_iterator_tag : public forward_iterator_tag {};
struct _LIBCPP_TEMPLATE_VIS random_access_iterator_tag : public bidirectional_iterator_tag {};
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
struct _LIBCPP_TEMPLATE_VIS contiguous_iterator_tag : public random_access_iterator_tag {};
#endif

Expand Down Expand Up @@ -157,7 +157,7 @@ struct __has_iterator_concept
static const bool value = decltype(__test<_Tp>(nullptr))::value;
};

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// The `cpp17-*-iterator` exposition-only concepts have very similar names to the `Cpp17*Iterator` named requirements
// from `[iterator.cpp17]`. To avoid confusion between the two, the exposition-only concepts have been banished to
Expand Down Expand Up @@ -381,7 +381,7 @@ struct iterator_traits : __iterator_traits<_Ip> {
using __primary_template = iterator_traits;
};

#else // _LIBCPP_STD_VER > 17
#else // _LIBCPP_STD_VER >= 20

template <class _Iter, bool> struct __iterator_traits {};

Expand Down Expand Up @@ -418,10 +418,10 @@ struct _LIBCPP_TEMPLATE_VIS iterator_traits

using __primary_template = iterator_traits;
};
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

template<class _Tp>
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
requires is_object_v<_Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*>
Expand All @@ -431,7 +431,7 @@ struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*>
typedef _Tp* pointer;
typedef _Tp& reference;
typedef random_access_iterator_tag iterator_category;
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
typedef contiguous_iterator_tag iterator_concept;
#endif
};
Expand Down Expand Up @@ -471,7 +471,7 @@ struct __is_cpp17_random_access_iterator : public __has_iterator_category_conver
// Such iterators receive special "contiguous" optimizations in
// std::copy and std::sort.
//
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Tp>
struct __is_cpp17_contiguous_iterator : _Or<
__has_iterator_category_convertible_to<_Tp, contiguous_iterator_tag>,
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/mergeable.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _Input1, class _Input2, class _Output,
class _Comp = ranges::less, class _Proj1 = identity, class _Proj2 = identity>
Expand All @@ -34,7 +34,7 @@ concept mergeable =
indirectly_copyable<_Input2, _Output> &&
indirect_strict_weak_order<_Comp, projected<_Input1, _Proj1>, projected<_Input2, _Proj2>>;

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
26 changes: 13 additions & 13 deletions libcxx/include/__iterator/move_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template<class _Iter, class = void>
struct __move_iter_category_base {};

Expand All @@ -59,16 +59,16 @@ template<class _Iter, class _Sent>
concept __move_iter_comparable = requires {
{ std::declval<const _Iter&>() == std::declval<_Sent>() } -> convertible_to<bool>;
};
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

template <class _Iter>
class _LIBCPP_TEMPLATE_VIS move_iterator
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
: public __move_iter_category_base<_Iter>
#endif
{
public:
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
using iterator_type = _Iter;
using iterator_concept = input_iterator_tag;
// iterator_category is inherited and not always present
Expand All @@ -93,7 +93,7 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
__libcpp_remove_reference_t<__reference>&&,
__reference
>::type reference;
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
explicit move_iterator(_Iter __i) : __current_(std::move(__i)) {}
Expand All @@ -104,7 +104,7 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
pointer operator->() const { return __current_; }

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
_LIBCPP_HIDE_FROM_ABI constexpr
move_iterator() requires is_constructible_v<_Iter> : __current_() {}

Expand Down Expand Up @@ -171,7 +171,7 @@ class _LIBCPP_TEMPLATE_VIS move_iterator

_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator operator++(int) { move_iterator __tmp(*this); ++__current_; return __tmp; }
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator& operator--() { --__current_; return *this; }
Expand All @@ -186,7 +186,7 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
move_iterator& operator-=(difference_type __n) { __current_ -= __n; return *this; }

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template<sentinel_for<_Iter> _Sent>
friend _LIBCPP_HIDE_FROM_ABI constexpr
bool operator==(const move_iterator& __x, const move_sentinel<_Sent>& __y)
Expand Down Expand Up @@ -223,7 +223,7 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
{
return ranges::iter_swap(__x.__current_, __y.__current_);
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

private:
template<class _It2> friend class move_iterator;
Expand Down Expand Up @@ -276,15 +276,15 @@ bool operator>=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& _
return __x.base() >= __y.base();
}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Iter1, three_way_comparable_with<_Iter1> _Iter2>
inline _LIBCPP_HIDE_FROM_ABI constexpr
auto operator<=>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
-> compare_three_way_result_t<_Iter1, _Iter2>
{
return __x.base() <=> __y.base();
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

#ifndef _LIBCPP_CXX03_LANG
template <class _Iter1, class _Iter2>
Expand All @@ -304,7 +304,7 @@ operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
}
#endif // !_LIBCPP_CXX03_LANG

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Iter>
inline _LIBCPP_HIDE_FROM_ABI constexpr
move_iterator<_Iter> operator+(iter_difference_t<_Iter> __n, const move_iterator<_Iter>& __x)
Expand All @@ -320,7 +320,7 @@ operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterato
{
return move_iterator<_Iter>(__x.base() + __n);
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

template <class _Iter>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/move_sentinel.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <semiregular _Sent>
class _LIBCPP_TEMPLATE_VIS move_sentinel
Expand Down Expand Up @@ -52,7 +52,7 @@ class _LIBCPP_TEMPLATE_VIS move_sentinel

_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(move_sentinel);

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/next.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
return __x;
}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// [range.iter.op.next]

Expand Down Expand Up @@ -77,7 +77,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__iterator/ostream_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
public:
typedef output_iterator_tag iterator_category;
typedef void value_type;
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
typedef ptrdiff_t difference_type;
#else
typedef void difference_type;
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__iterator/ostreambuf_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
public:
typedef output_iterator_tag iterator_category;
typedef void value_type;
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
typedef ptrdiff_t difference_type;
#else
typedef void difference_type;
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/permutable.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _Iterator>
concept permutable =
forward_iterator<_Iterator> &&
indirectly_movable_storable<_Iterator, _Iterator> &&
indirectly_swappable<_Iterator, _Iterator>;

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/prev.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
return __x;
}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// [range.iter.op.prev]

Expand Down Expand Up @@ -70,7 +70,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/projected.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template<indirectly_readable _It, indirectly_regular_unary_invocable<_It> _Proj>
struct projected {
Expand All @@ -34,7 +34,7 @@ struct incrementable_traits<projected<_It, _Proj>> {
using difference_type = iter_difference_t<_It>;
};

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/readable_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// [readable.traits]
template<class> struct __cond_value_type {};
Expand Down Expand Up @@ -85,7 +85,7 @@ using iter_value_t = typename conditional_t<__is_primary_template<iterator_trait
indirectly_readable_traits<remove_cvref_t<_Ip> >,
iterator_traits<remove_cvref_t<_Ip> > >::value_type;

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/reverse_access.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14

template <class _Tp, size_t _Np>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
Expand Down Expand Up @@ -93,7 +93,7 @@ auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c))
return _VSTD::rend(__c);
}

#endif // _LIBCPP_STD_VER > 11
#endif // _LIBCPP_STD_VER >= 14

_LIBCPP_END_NAMESPACE_STD

Expand Down
54 changes: 27 additions & 27 deletions libcxx/include/__iterator/reverse_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
_Iter __t_; // no longer used as of LWG #2360, not removed due to ABI break
#endif

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
static_assert(__is_cpp17_bidirectional_iterator<_Iter>::value || bidirectional_iterator<_Iter>,
"reverse_iterator<It> requires It to be a bidirectional iterator.");
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

protected:
_Iter current;
Expand All @@ -77,7 +77,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
random_access_iterator_tag,
typename iterator_traits<_Iter>::iterator_category>;
using pointer = typename iterator_traits<_Iter>::pointer;
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
using iterator_concept = _If<random_access_iterator<_Iter>, random_access_iterator_tag, bidirectional_iterator_tag>;
using value_type = iter_value_t<_Iter>;
using difference_type = iter_difference_t<_Iter>;
Expand Down Expand Up @@ -144,7 +144,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reference operator*() const {_Iter __tmp = current; return *--__tmp;}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
_LIBCPP_INLINE_VISIBILITY
constexpr pointer operator->() const
requires is_pointer_v<_Iter> || requires(const _Iter __i) { __i.operator->(); }
Expand All @@ -160,7 +160,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
pointer operator->() const {
return std::addressof(operator*());
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator& operator++() {--current; return *this;}
Expand All @@ -181,7 +181,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reference operator[](difference_type __n) const {return *(*this + __n);}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
_LIBCPP_HIDE_FROM_ABI friend constexpr
iter_rvalue_reference_t<_Iter> iter_move(const reverse_iterator& __i)
noexcept(is_nothrow_copy_constructible_v<_Iter> &&
Expand All @@ -200,18 +200,18 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
auto __ytmp = __y.base();
ranges::iter_swap(--__xtmp, --__ytmp);
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
};

template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
requires requires {
{ __x.base() == __y.base() } -> convertible_to<bool>;
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
{
return __x.base() == __y.base();
}
Expand All @@ -220,11 +220,11 @@ template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
requires requires {
{ __x.base() > __y.base() } -> convertible_to<bool>;
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
{
return __x.base() > __y.base();
}
Expand All @@ -233,11 +233,11 @@ template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
requires requires {
{ __x.base() != __y.base() } -> convertible_to<bool>;
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
{
return __x.base() != __y.base();
}
Expand All @@ -246,11 +246,11 @@ template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
requires requires {
{ __x.base() < __y.base() } -> convertible_to<bool>;
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
{
return __x.base() < __y.base();
}
Expand All @@ -259,11 +259,11 @@ template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
requires requires {
{ __x.base() <= __y.base() } -> convertible_to<bool>;
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
{
return __x.base() <= __y.base();
}
Expand All @@ -272,24 +272,24 @@ template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
bool
operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
requires requires {
{ __x.base() >= __y.base() } -> convertible_to<bool>;
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20
{
return __x.base() >= __y.base();
}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Iter1, three_way_comparable_with<_Iter1> _Iter2>
_LIBCPP_HIDE_FROM_ABI constexpr
compare_three_way_result_t<_Iter1, _Iter2>
operator<=>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
{
return __y.base() <=> __x.base();
}
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

#ifndef _LIBCPP_CXX03_LANG
template <class _Iter1, class _Iter2>
Expand Down Expand Up @@ -318,13 +318,13 @@ operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_i
return reverse_iterator<_Iter>(__x.base() - __n);
}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Iter1, class _Iter2>
requires (!sized_sentinel_for<_Iter1, _Iter2>)
inline constexpr bool disable_sized_sentinel_for<reverse_iterator<_Iter1>, reverse_iterator<_Iter2>> = true;
#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
template <class _Iter>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
reverse_iterator<_Iter> make_reverse_iterator(_Iter __i)
Expand Down Expand Up @@ -498,7 +498,7 @@ struct __unwrap_reverse_iter_impl {
}
};

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <ranges::bidirectional_range _Range>
_LIBCPP_HIDE_FROM_ABI constexpr ranges::
subrange<reverse_iterator<ranges::iterator_t<_Range>>, reverse_iterator<ranges::iterator_t<_Range>>>
Expand All @@ -512,7 +512,7 @@ template <class _Iter, bool __b>
struct __unwrap_iter_impl<reverse_iterator<reverse_iterator<_Iter> >, __b>
: __unwrap_reverse_iter_impl<reverse_iterator, reverse_iterator, _Iter> {};

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _Iter, bool __b>
struct __unwrap_iter_impl<reverse_iterator<__unconstrained_reverse_iterator<_Iter>>, __b>
Expand All @@ -526,7 +526,7 @@ template <class _Iter, bool __b>
struct __unwrap_iter_impl<__unconstrained_reverse_iterator<__unconstrained_reverse_iterator<_Iter>>, __b>
: __unwrap_reverse_iter_impl<__unconstrained_reverse_iterator, __unconstrained_reverse_iterator, _Iter> {};

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
6 changes: 3 additions & 3 deletions libcxx/include/__iterator/size.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <class _Cont>
_LIBCPP_INLINE_VISIBILITY
Expand All @@ -34,7 +34,7 @@ template <class _Tp, size_t _Sz>
_LIBCPP_INLINE_VISIBILITY
constexpr size_t size(const _Tp (&)[_Sz]) noexcept { return _Sz; }

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Cont>
_LIBCPP_INLINE_VISIBILITY
constexpr auto ssize(const _Cont& __c)
Expand All @@ -52,7 +52,7 @@ constexpr ptrdiff_t ssize(const _Tp (&)[_Sz]) noexcept { return _Sz; }
_LIBCPP_DIAGNOSTIC_POP
#endif

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/sortable.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _Iter, class _Comp = ranges::less, class _Proj = identity>
concept sortable =
permutable<_Iter> &&
indirect_strict_weak_order<_Comp, projected<_Iter, _Proj>>;

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__iterator/unreachable_sentinel.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

struct unreachable_sentinel_t {
template<weakly_incrementable _Iter>
Expand All @@ -31,7 +31,7 @@ struct unreachable_sentinel_t {

inline constexpr unreachable_sentinel_t unreachable_sentinel{};

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__iterator/wrap_iter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class __wrap_iter
typedef typename iterator_traits<iterator_type>::pointer pointer;
typedef typename iterator_traits<iterator_type>::reference reference;
typedef typename iterator_traits<iterator_type>::iterator_category iterator_category;
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
typedef contiguous_iterator_tag iterator_concept;
#endif

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__memory/aligned_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ inline _LIBCPP_HIDE_FROM_ABI
void* __libcpp_aligned_alloc(std::size_t __alignment, std::size_t __size) {
# if defined(_LIBCPP_MSVCRT_LIKE)
return ::_aligned_malloc(__size, __alignment);
# elif _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_C11_ALIGNED_ALLOC)
# elif _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_C11_ALIGNED_ALLOC)
// aligned_alloc() requires that __size is a multiple of __alignment,
// but for C++ [new.delete.general], only states "if the value of an
// alignment argument passed to any of these functions is not a valid
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory/allocate_at_least.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 20
#if _LIBCPP_STD_VER >= 23
template <class _Pointer>
struct allocation_result {
_Pointer ptr;
Expand Down Expand Up @@ -55,7 +55,7 @@ __allocation_result<typename allocator_traits<_Alloc>::pointer> __allocate_at_le
return {__alloc.allocate(__n), __n};
}

#endif // _LIBCPP_STD_VER > 20
#endif // _LIBCPP_STD_VER >= 23

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory/allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class _LIBCPP_TEMPLATE_VIS allocator
}
}

#if _LIBCPP_STD_VER > 20
#if _LIBCPP_STD_VER >= 23
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr
allocation_result<_Tp*> allocate_at_least(size_t __n) {
return {allocate(__n), __n};
Expand Down Expand Up @@ -205,7 +205,7 @@ class _LIBCPP_TEMPLATE_VIS allocator<const _Tp>
}
}

#if _LIBCPP_STD_VER > 20
#if _LIBCPP_STD_VER >= 23
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr
allocation_result<const _Tp*> allocate_at_least(size_t __n) {
return {allocate(__n), __n};
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory/allocator_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
__enable_if_t<!__has_construct<allocator_type, _Tp*, _Args...>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static void construct(allocator_type&, _Tp* __p, _Args&&... __args) {
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
_VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...);
#else
::new ((void*)__p) _Tp(_VSTD::forward<_Args>(__args)...);
Expand All @@ -319,7 +319,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
__enable_if_t<!__has_destroy<allocator_type, _Tp*>::value> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
static void destroy(allocator_type&, _Tp* __p) {
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
_VSTD::destroy_at(__p);
#else
__p->~_Tp();
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory/assume_aligned.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <size_t _Np, class _Tp>
[[nodiscard]]
Expand All @@ -39,7 +39,7 @@ constexpr _Tp* assume_aligned(_Tp* __ptr) {
}
}

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory/concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace ranges {

Expand Down Expand Up @@ -62,7 +62,7 @@ concept __nothrow_forward_range =

} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
12 changes: 6 additions & 6 deletions libcxx/include/__memory/construct_at.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD

// construct_at

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

template <class _Tp, class... _Args, class = decltype(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))>
_LIBCPP_HIDE_FROM_ABI constexpr _Tp* construct_at(_Tp* __location, _Args&&... __args) {
Expand All @@ -42,7 +42,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Tp* construct_at(_Tp* __location, _Args&&... __

template <class _Tp, class... _Args, class = decltype(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __construct_at(_Tp* __location, _Args&&... __args) {
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
return std::construct_at(__location, std::forward<_Args>(__args)...);
#else
return _LIBCPP_ASSERT(__location != nullptr, "null pointer given to construct_at"),
Expand All @@ -66,7 +66,7 @@ void __destroy_at(_Tp* __loc) {
__loc->~_Tp();
}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Tp, typename enable_if<is_array<_Tp>::value, int>::type = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void __destroy_at(_Tp* __loc) {
Expand All @@ -93,15 +93,15 @@ _BidirectionalIterator __reverse_destroy(_BidirectionalIterator __first, _Bidire
return __last;
}

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <class _Tp, enable_if_t<!is_array_v<_Tp>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void destroy_at(_Tp* __loc) {
std::__destroy_at(__loc);
}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Tp, enable_if_t<is_array_v<_Tp>, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
void destroy_at(_Tp* __loc) {
Expand All @@ -123,7 +123,7 @@ _ForwardIterator destroy_n(_ForwardIterator __first, _Size __n) {
return __first;
}

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__memory/pointer_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ struct __to_address_helper<_Pointer, decltype((void)pointer_traits<_Pointer>::to
}
};

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY constexpr
auto to_address(_Tp *__p) noexcept {
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory/ranges_construct_at.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
namespace ranges {

// construct_at
Expand Down Expand Up @@ -118,7 +118,7 @@ inline namespace __cpo {

} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory/ranges_uninitialized_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace ranges {

Expand Down Expand Up @@ -312,7 +312,7 @@ inline namespace __cpo {

} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__memory/raw_storage_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
public:
typedef output_iterator_tag iterator_category;
typedef void value_type;
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
typedef ptrdiff_t difference_type;
#else
typedef void difference_type;
Expand Down
36 changes: 18 additions & 18 deletions libcxx/include/__memory/shared_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ struct __shared_ptr_emplace

private:
void __on_zero_shared() _NOEXCEPT override {
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
__get_elem()->~_Tp();
} else {
Expand Down Expand Up @@ -459,7 +459,7 @@ template<class _Tp>
class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
{
public:
#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
typedef weak_ptr<_Tp> weak_type;
typedef remove_extent_t<_Tp> element_type;
#else
Expand Down Expand Up @@ -699,7 +699,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
shared_ptr(unique_ptr<_Yp, _Dp>&& __r)
: __ptr_(__r.get())
{
#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
if (__ptr_ == nullptr)
__cntrl_ = nullptr;
else
Expand All @@ -722,7 +722,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
shared_ptr(unique_ptr<_Yp, _Dp>&& __r)
: __ptr_(__r.get())
{
#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
if (__ptr_ == nullptr)
__cntrl_ = nullptr;
else
Expand Down Expand Up @@ -895,7 +895,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
return __cntrl_ == __p.__cntrl_;
}

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
_LIBCPP_HIDE_FROM_ABI
__add_lvalue_reference_t<element_type> operator[](ptrdiff_t __i) const
{
Expand Down Expand Up @@ -975,7 +975,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
template <class _Up> friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
};

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template<class _Tp>
shared_ptr(weak_ptr<_Tp>) -> shared_ptr<_Tp>;
template<class _Tp, class _Dp>
Expand Down Expand Up @@ -1024,7 +1024,7 @@ shared_ptr<_Tp> make_shared_for_overwrite()

#endif // _LIBCPP_STD_VER >= 20

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <size_t _Alignment>
struct __sp_aligned_storage {
Expand Down Expand Up @@ -1214,9 +1214,9 @@ shared_ptr<_Array> __allocate_shared_bounded_array(const _Alloc& __a, _Arg&& ...
return shared_ptr<_Array>::__create_with_control_block(__control_block->__get_data(), __control_block);
}

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// bounded array variants
template<class _Tp, class _Alloc, class = __enable_if_t<is_bounded_array<_Tp>::value>>
Expand Down Expand Up @@ -1308,7 +1308,7 @@ shared_ptr<_Tp> make_shared_for_overwrite(size_t __n)
return std::__allocate_shared_unbounded_array<_Tp>(allocator<__for_overwrite_tag>(), __n);
}

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

template<class _Tp, class _Up>
inline _LIBCPP_INLINE_VISIBILITY
Expand Down Expand Up @@ -1368,7 +1368,7 @@ operator>=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT

#endif // _LIBCPP_STD_VER <= 17

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template<class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI strong_ordering
operator<=>(shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) noexcept
Expand Down Expand Up @@ -1477,7 +1477,7 @@ operator>=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT

#endif // _LIBCPP_STD_VER <= 17

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template<class _Tp>
_LIBCPP_HIDE_FROM_ABI strong_ordering
operator<=>(shared_ptr<_Tp> const& __x, nullptr_t) noexcept
Expand Down Expand Up @@ -1547,7 +1547,7 @@ template<class _Tp>
class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr
{
public:
#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
typedef remove_extent_t<_Tp> element_type;
#else
typedef _Tp element_type;
Expand Down Expand Up @@ -1632,7 +1632,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr
template <class _Up> friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
};

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template<class _Tp>
weak_ptr(shared_ptr<_Tp>) -> weak_ptr<_Tp>;
#endif
Expand Down Expand Up @@ -1808,7 +1808,7 @@ weak_ptr<_Tp>::lock() const _NOEXCEPT
return __r;
}

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _Tp = void> struct owner_less;
#else
template <class _Tp> struct owner_less;
Expand Down Expand Up @@ -1845,7 +1845,7 @@ struct _LIBCPP_TEMPLATE_VIS owner_less<weak_ptr<_Tp> >
{return __x.owner_before(__y);}
};

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <>
struct _LIBCPP_TEMPLATE_VIS owner_less<void>
{
Expand Down Expand Up @@ -1891,15 +1891,15 @@ class _LIBCPP_TEMPLATE_VIS enable_shared_from_this
shared_ptr<_Tp const> shared_from_this() const
{return shared_ptr<const _Tp>(__weak_this_);}

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
_LIBCPP_INLINE_VISIBILITY
weak_ptr<_Tp> weak_from_this() _NOEXCEPT
{ return __weak_this_; }

_LIBCPP_INLINE_VISIBILITY
weak_ptr<const _Tp> weak_from_this() const _NOEXCEPT
{ return __weak_this_; }
#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

template <class _Up> friend class shared_ptr;
};
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory/swap_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD

template <typename _Alloc>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swap_allocator(_Alloc& __a1, _Alloc& __a2, true_type)
#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
_NOEXCEPT
#else
_NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value)
Expand All @@ -39,7 +39,7 @@ __swap_allocator(_Alloc&, _Alloc&, false_type) _NOEXCEPT {}

template <typename _Alloc>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __swap_allocator(_Alloc& __a1, _Alloc& __a2)
#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14
_NOEXCEPT
#else
_NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value)
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory/uninitialized_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ _ForwardIterator uninitialized_fill_n(_ForwardIterator __first, _Size __n, const
return _VSTD::__uninitialized_fill_n<_ValueType>(__first, __n, __x);
}

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

// uninitialized_default_construct

Expand Down Expand Up @@ -512,7 +512,7 @@ __uninitialized_allocator_value_construct_n_multidimensional(_Alloc& __alloc, _B
__guard.__complete();
}

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

// Destroy all elements in [__first, __last) from left to right using allocator destruction.
template <class _Alloc, class _Iter, class _Sent>
Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/__memory/unique_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ bool
operator>=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__x < __y);}


#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _T1, class _D1, class _T2, class _D2>
requires three_way_comparable_with<typename unique_ptr<_T1, _D1>::pointer,
typename unique_ptr<_T2, _D2>::pointer>
Expand Down Expand Up @@ -650,7 +650,7 @@ operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
return !(nullptr < __x);
}

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _T1, class _D1>
requires three_way_comparable<
typename unique_ptr<_T1, _D1>::pointer> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23
Expand All @@ -660,7 +660,7 @@ operator<=>(const unique_ptr<_T1, _D1>& __x, nullptr_t) {
}
#endif

#if _LIBCPP_STD_VER > 11
#if _LIBCPP_STD_VER >= 14

template<class _Tp>
struct __unique_if
Expand Down Expand Up @@ -697,7 +697,7 @@ template<class _Tp, class... _Args>
typename __unique_if<_Tp>::__unique_array_known_bound
make_unique(_Args&&...) = delete;

#endif // _LIBCPP_STD_VER > 11
#endif // _LIBCPP_STD_VER >= 14

#if _LIBCPP_STD_VER >= 20

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__memory/uses_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator
{
};

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _Tp, class _Alloc>
inline constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value;
#endif
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory/uses_allocator_construction.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ __uses_allocator_construction_args(const _Alloc& __alloc, _Up&& __u, _Vp&& __v)
std::forward_as_tuple(std::forward<_Vp>(__v)));
}

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_std_pair<_Pair>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, pair<_Up, _Vp>& __pair) noexcept {
Expand All @@ -109,7 +109,7 @@ __uses_allocator_construction_args(const _Alloc& __alloc, pair<_Up, _Vp>&& __pai
std::forward_as_tuple(std::get<1>(std::move(__pair))));
}

# if _LIBCPP_STD_VER > 20
# if _LIBCPP_STD_VER >= 23
template <class _Pair, class _Alloc, class _Up, class _Vp, __enable_if_t<__is_std_pair<_Pair>, int> = 0>
_LIBCPP_HIDE_FROM_ABI constexpr auto
__uses_allocator_construction_args(const _Alloc& __alloc, const pair<_Up, _Vp>&& __pair) noexcept {
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory_resource/memory_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# pragma GCC system_header
#endif

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

_LIBCPP_BEGIN_NAMESPACE_STD

Expand Down Expand Up @@ -70,6 +70,6 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const memory_resource& __lhs, const

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

#endif // _LIBCPP___MEMORY_RESOURCE_MEMORY_RESOURCE_H
4 changes: 2 additions & 2 deletions libcxx/include/__memory_resource/monotonic_buffer_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# pragma GCC system_header
#endif

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

_LIBCPP_BEGIN_NAMESPACE_STD

Expand Down Expand Up @@ -115,6 +115,6 @@ class _LIBCPP_TYPE_VIS monotonic_buffer_resource : public memory_resource {

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

#endif // _LIBCPP___MEMORY_RESOURCE_MONOTONIC_BUFFER_RESOURCE_H
4 changes: 2 additions & 2 deletions libcxx/include/__memory_resource/polymorphic_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
_LIBCPP_PUSH_MACROS
#include <__undef_macros>

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

_LIBCPP_BEGIN_NAMESPACE_STD

Expand Down Expand Up @@ -217,7 +217,7 @@ operator!=(const polymorphic_allocator<_Tp>& __lhs, const polymorphic_allocator<

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_POP_MACROS

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__memory_resource/pool_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# pragma GCC system_header
#endif

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

_LIBCPP_BEGIN_NAMESPACE_STD

Expand All @@ -33,6 +33,6 @@ struct _LIBCPP_TYPE_VIS pool_options {

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

#endif // _LIBCPP___MEMORY_RESOURCE_POOL_OPTIONS_H
4 changes: 2 additions & 2 deletions libcxx/include/__memory_resource/synchronized_pool_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# pragma GCC system_header
#endif

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

_LIBCPP_BEGIN_NAMESPACE_STD

Expand Down Expand Up @@ -89,6 +89,6 @@ class _LIBCPP_TYPE_VIS synchronized_pool_resource : public memory_resource {

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

#endif // _LIBCPP___MEMORY_RESOURCE_SYNCHRONIZED_POOL_RESOURCE_H
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# pragma GCC system_header
#endif

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

_LIBCPP_BEGIN_NAMESPACE_STD

Expand Down Expand Up @@ -101,6 +101,6 @@ class _LIBCPP_TYPE_VIS unsynchronized_pool_resource : public memory_resource {

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

#endif // _LIBCPP___MEMORY_RESOURCE_UNSYNCHRONIZED_POOL_RESOURCE_H
4 changes: 2 additions & 2 deletions libcxx/include/__node_handle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public:

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

// Specialized in __tree & __hash_table for their _NodeType.
template <class _NodeType, class _Alloc>
Expand Down Expand Up @@ -247,7 +247,7 @@ struct _LIBCPP_TEMPLATE_VIS __insert_return_type
_NodeType node;
};

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__numeric/accumulate.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ _Tp
accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
{
for (; __first != __last; ++__first)
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
__init = _VSTD::move(__init) + *__first;
#else
__init = __init + *__first;
Expand All @@ -39,7 +39,7 @@ _Tp
accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op)
{
for (; __first != __last; ++__first)
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
__init = __binary_op(_VSTD::move(__init), *__first);
#else
__init = __binary_op(__init, *__first);
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__numeric/adjacent_difference.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterat
for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result)
{
typename iterator_traits<_InputIterator>::value_type __val(*__first);
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
*__result = __val - _VSTD::move(__acc);
#else
*__result = __val - __acc;
Expand All @@ -56,7 +56,7 @@ adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterat
for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result)
{
typename iterator_traits<_InputIterator>::value_type __val(*__first);
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
*__result = __binary_op(__val, _VSTD::move(__acc));
#else
*__result = __binary_op(__val, __acc);
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__numeric/exclusive_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
Expand All @@ -46,7 +46,7 @@ exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __
return _VSTD::exclusive_scan(__first, __last, __result, __init, _VSTD::plus<>());
}

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__numeric/gcd_lcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ _LIBCPP_PUSH_MACROS

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <typename _Result, typename _Source, bool _IsSigned = is_signed<_Source>::value> struct __ct_abs;

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__numeric/inclusive_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
Expand Down Expand Up @@ -53,7 +53,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator inclusiv
return _VSTD::inclusive_scan(__first, __last, __result, _VSTD::plus<>());
}

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__numeric/inner_product.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ _Tp
inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init)
{
for (; __first1 != __last1; ++__first1, (void) ++__first2)
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
__init = _VSTD::move(__init) + *__first1 * *__first2;
#else
__init = __init + *__first1 * *__first2;
Expand All @@ -40,7 +40,7 @@ inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2
_Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2)
{
for (; __first1 != __last1; ++__first1, (void) ++__first2)
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
__init = __binary_op1(_VSTD::move(__init), __binary_op2(*__first1, *__first2));
#else
__init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__numeric/midpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ _LIBCPP_PUSH_MACROS

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
enable_if_t<is_integral_v<_Tp> && !is_same_v<bool, _Tp> && !is_null_pointer_v<_Tp>, _Tp>
Expand Down Expand Up @@ -86,7 +86,7 @@ midpoint(_Fp __a, _Fp __b) noexcept
__a/2 + __b/2; // otherwise correctly rounded
}

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__numeric/partial_sum.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res
*__result = __t;
for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result)
{
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
__t = _VSTD::move(__t) + *__first;
#else
__t = __t + *__first;
Expand All @@ -54,7 +54,7 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res
*__result = __t;
for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result)
{
#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20
__t = __binary_op(_VSTD::move(__t), *__first);
#else
__t = __binary_op(__t, *__first);
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__numeric/reduce.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _InputIterator, class _Tp, class _BinaryOp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp reduce(_InputIterator __first, _InputIterator __last,
_Tp __init, _BinaryOp __b) {
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__numeric/transform_exclusive_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <class _InputIterator, class _OutputIterator, class _Tp,
class _BinaryOp, class _UnaryOp>
Expand All @@ -42,7 +42,7 @@ transform_exclusive_scan(_InputIterator __first, _InputIterator __last,
return __result;
}

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__numeric/transform_inclusive_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17

template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp, class _UnaryOp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
Expand Down Expand Up @@ -51,7 +51,7 @@ transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
return __result;
}

#endif // _LIBCPP_STD_VER > 14
#endif // _LIBCPP_STD_VER >= 17

_LIBCPP_END_NAMESPACE_STD

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__numeric/transform_reduce.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 14
#if _LIBCPP_STD_VER >= 17
template <class _InputIterator, class _Tp, class _BinaryOp, class _UnaryOp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp transform_reduce(_InputIterator __first,
_InputIterator __last, _Tp __init,
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__random/uniform_random_bit_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ _LIBCPP_PUSH_MACROS

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// [rand.req.urng]
template<class _Gen>
Expand All @@ -37,7 +37,7 @@ concept uniform_random_bit_generator =
requires bool_constant<(_Gen::min() < _Gen::max())>::value;
};

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__ranges/access.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace ranges {
template <class _Tp>
Expand Down Expand Up @@ -223,7 +223,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__ranges/all.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace ranges::views {

Expand Down Expand Up @@ -77,7 +77,7 @@ using all_t = decltype(views::all(std::declval<_Range>()));

} // namespace ranges::views

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__ranges/common_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace ranges {

Expand Down Expand Up @@ -130,7 +130,7 @@ inline namespace __cpo {
} // namespace views
} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__ranges/concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

namespace ranges {

Expand Down Expand Up @@ -140,7 +140,7 @@ namespace ranges {

} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__ranges/copyable_box.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER > 17
#if _LIBCPP_STD_VER >= 20

// __copyable_box allows turning a type that is copy-constructible (but maybe not copy-assignable) into
// a type that is both copy-constructible and copy-assignable. It does that by introducing an empty state
Expand Down Expand Up @@ -173,7 +173,7 @@ namespace ranges {
};
} // namespace ranges

#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

Expand Down
Loading