[libcxx-commits] [libcxx] [libc++] Remove redundant `_LIBCPP_HIDE_FROM_ABI` from detail headers d-i (PR #234100)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 21 00:53:29 PDT 2026
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/234100
This is the second bulk-removal patch of `_LIBCPP_HIDE_FROM_ABI`. While
this is something we could do over time, actively removing the redundant
annotations significanly improves readability, and QoI.
This happens in a few patches to keep the size somewhat manageable.
>From 6f98e344779110549bf0e7756ca14479d1121621 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Wed, 14 Oct 2026 09:59:33 +0200
Subject: [PATCH] [libc++] Remove redundant `_LIBCPP_HIDE_FROM_ABI` from detail
headers d-i
This is the second bulk-removal patch of `_LIBCPP_HIDE_FROM_ABI`. While
this is something we could do over time, actively removing the redundant
annotations significanly improves readability, and QoI.
This happens in a few patches to keep the size somewhat manageable.
---
.../include/__debug_utils/randomize_range.h | 2 +-
libcxx/include/__debug_utils/sanitizers.h | 4 +-
.../strict_weak_ordering_check.h | 2 +-
libcxx/include/__expected/expected.h | 469 +++++++++---------
libcxx/include/__expected/unexpected.h | 34 +-
libcxx/include/__filesystem/copy_options.h | 20 +-
.../include/__filesystem/directory_options.h | 17 +-
libcxx/include/__filesystem/file_status.h | 25 +-
libcxx/include/__filesystem/operations.h | 273 ++++------
libcxx/include/__filesystem/perm_options.h | 20 +-
libcxx/include/__filesystem/perms.h | 14 +-
libcxx/include/__filesystem/space_info.h | 2 +-
libcxx/include/__filesystem/u8path.h | 6 +-
libcxx/include/__flat_map/flat_map.h | 386 ++++++--------
libcxx/include/__flat_map/flat_multimap.h | 342 ++++++-------
.../include/__flat_map/key_value_iterator.h | 54 +-
libcxx/include/__flat_map/utils.h | 6 +-
libcxx/include/__flat_set/flat_multiset.h | 252 ++++------
libcxx/include/__flat_set/flat_set.h | 266 +++++-----
libcxx/include/__flat_set/ra_iterator.h | 52 +-
libcxx/include/__flat_set/utils.h | 8 +-
libcxx/include/__format/buffer.h | 126 +++--
libcxx/include/__format/container_adaptor.h | 5 +-
.../include/__format/escaped_output_table.h | 2 +-
.../extended_grapheme_cluster_table.h | 2 +-
libcxx/include/__format/format_arg.h | 65 ++-
libcxx/include/__format/format_arg_store.h | 10 +-
libcxx/include/__format/format_args.h | 7 +-
libcxx/include/__format/format_context.h | 34 +-
libcxx/include/__format/format_functions.h | 141 +++---
.../include/__format/format_parse_context.h | 13 +-
libcxx/include/__format/format_string.h | 17 +-
libcxx/include/__format/formatter.h | 2 +-
libcxx/include/__format/formatter_bool.h | 8 +-
libcxx/include/__format/formatter_bool_impl.h | 4 +-
libcxx/include/__format/formatter_char.h | 8 +-
.../__format/formatter_floating_point.h | 64 ++-
libcxx/include/__format/formatter_integer.h | 4 +-
libcxx/include/__format/formatter_integral.h | 23 +-
libcxx/include/__format/formatter_output.h | 65 ++-
libcxx/include/__format/formatter_pointer.h | 4 +-
libcxx/include/__format/formatter_string.h | 19 +-
libcxx/include/__format/formatter_tuple.h | 12 +-
.../__format/indic_conjunct_break_table.h | 2 +-
.../include/__format/parser_std_format_spec.h | 82 ++-
.../__format/range_default_formatter.h | 27 +-
libcxx/include/__format/range_formatter.h | 25 +-
libcxx/include/__format/unicode.h | 77 ++-
.../include/__format/width_estimation_table.h | 2 +-
libcxx/include/__format/write_escaped.h | 40 +-
libcxx/include/__functional/binary_negate.h | 9 +-
libcxx/include/__functional/bind.h | 29 +-
libcxx/include/__functional/bind_back.h | 12 +-
libcxx/include/__functional/bind_front.h | 12 +-
libcxx/include/__functional/binder1st.h | 16 +-
libcxx/include/__functional/binder2nd.h | 16 +-
.../__functional/boyer_moore_searcher.h | 49 +-
libcxx/include/__functional/compose.h | 4 +-
.../include/__functional/default_searcher.h | 4 +-
.../__functional/function_ref_common.h | 6 +-
.../include/__functional/function_ref_impl.h | 22 +-
libcxx/include/__functional/hash.h | 55 +-
libcxx/include/__functional/identity.h | 4 +-
libcxx/include/__functional/invoke.h | 5 +-
libcxx/include/__functional/mem_fn.h | 9 +-
libcxx/include/__functional/mem_fun_ref.h | 52 +-
libcxx/include/__functional/not_fn.h | 8 +-
libcxx/include/__functional/operations.h | 119 ++---
libcxx/include/__functional/perfect_forward.h | 18 +-
.../__functional/pointer_to_binary_function.h | 6 +-
.../__functional/pointer_to_unary_function.h | 7 +-
.../include/__functional/ranges_operations.h | 12 +-
.../include/__functional/reference_wrapper.h | 32 +-
libcxx/include/__functional/unary_negate.h | 8 +-
libcxx/include/__fwd/array.h | 8 +-
libcxx/include/__fwd/bit_reference.h | 8 +-
libcxx/include/__fwd/complex.h | 8 +-
libcxx/include/__fwd/pair.h | 10 +-
libcxx/include/__fwd/subrange.h | 4 +-
libcxx/include/__fwd/tuple.h | 10 +-
libcxx/include/__fwd/variant.h | 16 +-
libcxx/include/__ios/fpos.h | 22 +-
libcxx/include/__iterator/access.h | 31 +-
libcxx/include/__iterator/advance.h | 19 +-
libcxx/include/__iterator/aliasing_iterator.h | 34 +-
.../include/__iterator/back_insert_iterator.h | 22 +-
libcxx/include/__iterator/bounded_iter.h | 66 ++-
.../__iterator/capacity_aware_iterator.h | 41 +-
libcxx/include/__iterator/common_iterator.h | 40 +-
libcxx/include/__iterator/counted_iterator.h | 65 ++-
libcxx/include/__iterator/data.h | 10 +-
libcxx/include/__iterator/distance.h | 16 +-
libcxx/include/__iterator/empty.h | 7 +-
.../include/__iterator/erase_if_container.h | 2 +-
.../__iterator/front_insert_iterator.h | 19 +-
libcxx/include/__iterator/insert_iterator.h | 17 +-
libcxx/include/__iterator/istream_iterator.h | 30 +-
.../include/__iterator/istreambuf_iterator.h | 34 +-
libcxx/include/__iterator/iter_move.h | 12 +-
libcxx/include/__iterator/iter_swap.h | 6 +-
.../include/__iterator/iterator_with_data.h | 25 +-
libcxx/include/__iterator/move_iterator.h | 104 ++--
libcxx/include/__iterator/move_sentinel.h | 10 +-
libcxx/include/__iterator/next.h | 11 +-
libcxx/include/__iterator/ostream_iterator.h | 14 +-
.../include/__iterator/ostreambuf_iterator.h | 18 +-
libcxx/include/__iterator/prev.h | 11 +-
libcxx/include/__iterator/reverse_access.h | 35 +-
libcxx/include/__iterator/reverse_iterator.h | 81 ++-
libcxx/include/__iterator/size.h | 8 +-
.../include/__iterator/static_bounded_iter.h | 99 ++--
.../include/__iterator/unreachable_sentinel.h | 2 +-
libcxx/include/__iterator/wrap_iter.h | 86 ++--
113 files changed, 2065 insertions(+), 2654 deletions(-)
diff --git a/libcxx/include/__debug_utils/randomize_range.h b/libcxx/include/__debug_utils/randomize_range.h
index 7eb77d81ab2a3d..f330b1477e2172 100644
--- a/libcxx/include/__debug_utils/randomize_range.h
+++ b/libcxx/include/__debug_utils/randomize_range.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Iterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __debug_randomize_range(_Iterator __first, _Sentinel __last) {
+_LIBCPP_CONSTEXPR_SINCE_CXX14 void __debug_randomize_range(_Iterator __first, _Sentinel __last) {
#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
# ifdef _LIBCPP_CXX03_LANG
# error Support for unspecified stability is only for C++11 and higher
diff --git a/libcxx/include/__debug_utils/sanitizers.h b/libcxx/include/__debug_utils/sanitizers.h
index e35812cc440d78..68617398302de2 100644
--- a/libcxx/include/__debug_utils/sanitizers.h
+++ b/libcxx/include/__debug_utils/sanitizers.h
@@ -75,7 +75,7 @@ struct __asan_annotate_container_with_allocator : true_type {};
// - [__first_old_contained, __last_old_contained) is the previously allowed (unpoisoned) range, and
// - [__first_new_contained, __last_new_contained) is the new allowed (unpoisoned) range.
template <class _Allocator>
-_LIBCPP_HIDE_FROM_ABI void __annotate_double_ended_contiguous_container(
+void __annotate_double_ended_contiguous_container(
const void* __first_storage,
const void* __last_storage,
const void* __first_old_contained,
@@ -106,7 +106,7 @@ _LIBCPP_HIDE_FROM_ABI void __annotate_double_ended_contiguous_container(
// __old_last_contained is the previously last allowed (unpoisoned) element, and
// __new_last_contained is the new last allowed (unpoisoned) element.
template <class _Allocator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void __annotate_contiguous_container(
+_LIBCPP_CONSTEXPR_SINCE_CXX14 void __annotate_contiguous_container(
const void* __first_storage,
const void* __last_storage,
const void* __old_last_contained,
diff --git a/libcxx/include/__debug_utils/strict_weak_ordering_check.h b/libcxx/include/__debug_utils/strict_weak_ordering_check.h
index 3724ca95c5d42f..aca4fe49677925 100644
--- a/libcxx/include/__debug_utils/strict_weak_ordering_check.h
+++ b/libcxx/include/__debug_utils/strict_weak_ordering_check.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RandomAccessIterator, class _Comp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+_LIBCPP_CONSTEXPR_SINCE_CXX14 void
__check_strict_weak_ordering_sorted(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
#if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG
using __diff_t = __iterator_difference_type<_RandomAccessIterator>;
diff --git a/libcxx/include/__expected/expected.h b/libcxx/include/__expected/expected.h
index 13d01ad53c62cc..067fffabbbabde 100644
--- a/libcxx/include/__expected/expected.h
+++ b/libcxx/include/__expected/expected.h
@@ -73,7 +73,7 @@ struct __expected_construct_in_place_from_invoke_tag {};
struct __expected_construct_unexpected_from_invoke_tag {};
template <class _Err, class _Arg>
-_LIBCPP_HIDE_FROM_ABI void __throw_bad_expected_access(_Arg&& __arg) {
+void __throw_bad_expected_access(_Arg&& __arg) {
# if _LIBCPP_HAS_EXCEPTIONS
throw bad_expected_access<_Err>(std::forward<_Arg>(__arg));
# else
@@ -106,11 +106,11 @@ struct __conditional_no_unique_address;
template <class _Tp>
struct __conditional_no_unique_address<true, _Tp> {
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __conditional_no_unique_address(in_place_t, _Args&&... __args)
+ constexpr explicit __conditional_no_unique_address(in_place_t, _Args&&... __args)
: __v(std::forward<_Args>(__args)...) {}
template <class _Func, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __conditional_no_unique_address(
+ constexpr explicit __conditional_no_unique_address(
__conditional_no_unique_address_invoke_tag, _Func&& __f, _Args&&... __args)
: __v(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {}
@@ -120,11 +120,11 @@ struct __conditional_no_unique_address<true, _Tp> {
template <class _Tp>
struct __conditional_no_unique_address<false, _Tp> {
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __conditional_no_unique_address(in_place_t, _Args&&... __args)
+ constexpr explicit __conditional_no_unique_address(in_place_t, _Args&&... __args)
: __v(std::forward<_Args>(__args)...) {}
template <class _Func, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __conditional_no_unique_address(
+ constexpr explicit __conditional_no_unique_address(
__conditional_no_unique_address_invoke_tag, _Func&& __f, _Args&&... __args)
: __v(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {}
@@ -216,43 +216,39 @@ class __expected_base {
// it's not clear that it's implementable, given that the function is allowed to clobber
// the tail padding) - see https://github.com/itanium-cxx-abi/cxx-abi/issues/107.
union __union_t {
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&)
+ constexpr __union_t(const __union_t&) = delete;
+ constexpr __union_t(const __union_t&)
requires(is_copy_constructible_v<_Tp> && is_copy_constructible_v<_Err> &&
is_trivially_copy_constructible_v<_Tp> && is_trivially_copy_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t(__union_t&&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t(__union_t&&)
+ constexpr __union_t(__union_t&&) = delete;
+ constexpr __union_t(__union_t&&)
requires(is_move_constructible_v<_Tp> && is_move_constructible_v<_Err> &&
is_trivially_move_constructible_v<_Tp> && is_trivially_move_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(const __union_t&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(__union_t&&) = delete;
+ constexpr __union_t& operator=(const __union_t&) = delete;
+ constexpr __union_t& operator=(__union_t&&) = delete;
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(in_place_t, _Args&&... __args)
- : __val_(std::forward<_Args>(__args)...) {}
+ constexpr explicit __union_t(in_place_t, _Args&&... __args) : __val_(std::forward<_Args>(__args)...) {}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(unexpect_t, _Args&&... __args)
- : __unex_(std::forward<_Args>(__args)...) {}
+ constexpr explicit __union_t(unexpect_t, _Args&&... __args) : __unex_(std::forward<_Args>(__args)...) {}
template <class _Func, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(
- std::__expected_construct_in_place_from_invoke_tag, _Func&& __f, _Args&&... __args)
+ constexpr explicit __union_t(std::__expected_construct_in_place_from_invoke_tag, _Func&& __f, _Args&&... __args)
: __val_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {}
template <class _Func, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(
- std::__expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args)
+ constexpr explicit __union_t(std::__expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args)
: __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {}
- _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t()
+ constexpr ~__union_t()
requires(is_trivially_destructible_v<_Tp> && is_trivially_destructible_v<_Err>)
= default;
// __repr's destructor handles this
- _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t() {}
+ constexpr ~__union_t() {}
_LIBCPP_NO_UNIQUE_ADDRESS _Tp __val_;
_LIBCPP_NO_UNIQUE_ADDRESS _Err __unex_;
@@ -262,24 +258,22 @@ class __expected_base {
static constexpr bool __allow_reusing_expected_tail_padding = !__put_flag_in_tail;
struct __repr {
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr() = delete;
+ constexpr explicit __repr() = delete;
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr(in_place_t __tag, _Args&&... __args)
+ constexpr explicit __repr(in_place_t __tag, _Args&&... __args)
: __union_(in_place, __tag, std::forward<_Args>(__args)...), __has_val_(true) {}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr(unexpect_t __tag, _Args&&... __args)
+ constexpr explicit __repr(unexpect_t __tag, _Args&&... __args)
: __union_(in_place, __tag, std::forward<_Args>(__args)...), __has_val_(false) {}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr(std::__expected_construct_in_place_from_invoke_tag __tag,
- _Args&&... __args)
+ constexpr explicit __repr(std::__expected_construct_in_place_from_invoke_tag __tag, _Args&&... __args)
: __union_(in_place, __tag, std::forward<_Args>(__args)...), __has_val_(true) {}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr(std::__expected_construct_unexpected_from_invoke_tag __tag,
- _Args&&... __args)
+ constexpr explicit __repr(std::__expected_construct_unexpected_from_invoke_tag __tag, _Args&&... __args)
: __union_(in_place, __tag, std::forward<_Args>(__args)...), __has_val_(false) {}
// The return value of `__make_union` must be constructed in place in the
@@ -288,37 +282,37 @@ class __expected_base {
// called with a lambda that is immediately called inside
// `__conditional_no_unique_address`'s constructor.
template <class _OtherUnion>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr(bool __has_val, _OtherUnion&& __other)
+ constexpr explicit __repr(bool __has_val, _OtherUnion&& __other)
requires(__allow_reusing_expected_tail_padding)
: __union_(__conditional_no_unique_address_invoke_tag{},
[&] { return __make_union(__has_val, std::forward<_OtherUnion>(__other)); }),
__has_val_(__has_val) {}
- _LIBCPP_HIDE_FROM_ABI constexpr __repr(const __repr&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __repr(const __repr&)
+ constexpr __repr(const __repr&) = delete;
+ constexpr __repr(const __repr&)
requires(is_copy_constructible_v<_Tp> && is_copy_constructible_v<_Err> &&
is_trivially_copy_constructible_v<_Tp> && is_trivially_copy_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr __repr(__repr&&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __repr(__repr&&)
+ constexpr __repr(__repr&&) = delete;
+ constexpr __repr(__repr&&)
requires(is_move_constructible_v<_Tp> && is_move_constructible_v<_Err> &&
is_trivially_move_constructible_v<_Tp> && is_trivially_move_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr __repr& operator=(const __repr&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __repr& operator=(__repr&&) = delete;
+ constexpr __repr& operator=(const __repr&) = delete;
+ constexpr __repr& operator=(__repr&&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr ~__repr()
+ constexpr ~__repr()
requires(is_trivially_destructible_v<_Tp> && is_trivially_destructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr ~__repr()
+ constexpr ~__repr()
requires(!is_trivially_destructible_v<_Tp> || !is_trivially_destructible_v<_Err>)
{
__destroy_union_member();
}
- _LIBCPP_HIDE_FROM_ABI constexpr void __destroy_union()
+ constexpr void __destroy_union()
requires(__allow_reusing_expected_tail_padding &&
(is_trivially_destructible_v<_Tp> && is_trivially_destructible_v<_Err>))
{
@@ -327,7 +321,7 @@ class __expected_base {
std::destroy_at(&__union_.__v);
}
- _LIBCPP_HIDE_FROM_ABI constexpr void __destroy_union()
+ constexpr void __destroy_union()
requires(__allow_reusing_expected_tail_padding &&
(!is_trivially_destructible_v<_Tp> || !is_trivially_destructible_v<_Err>))
{
@@ -336,7 +330,7 @@ class __expected_base {
}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr void __construct_union(in_place_t, _Args&&... __args)
+ constexpr void __construct_union(in_place_t, _Args&&... __args)
requires(__allow_reusing_expected_tail_padding)
{
std::construct_at(&__union_.__v, in_place, std::forward<_Args>(__args)...);
@@ -344,7 +338,7 @@ class __expected_base {
}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr void __construct_union(unexpect_t, _Args&&... __args)
+ constexpr void __construct_union(unexpect_t, _Args&&... __args)
requires(__allow_reusing_expected_tail_padding)
{
std::construct_at(&__union_.__v, unexpect, std::forward<_Args>(__args)...);
@@ -355,7 +349,7 @@ class __expected_base {
template <class, class>
friend class __expected_base;
- _LIBCPP_HIDE_FROM_ABI constexpr void __destroy_union_member()
+ constexpr void __destroy_union_member()
requires(!is_trivially_destructible_v<_Tp> || !is_trivially_destructible_v<_Err>)
{
if (__has_val_) {
@@ -366,7 +360,7 @@ class __expected_base {
}
template <class _OtherUnion>
- _LIBCPP_HIDE_FROM_ABI static constexpr __union_t __make_union(bool __has_val, _OtherUnion&& __other)
+ static constexpr __union_t __make_union(bool __has_val, _OtherUnion&& __other)
requires(__allow_reusing_expected_tail_padding)
{
if (__has_val)
@@ -380,7 +374,7 @@ class __expected_base {
};
template <class _OtherUnion>
- _LIBCPP_HIDE_FROM_ABI static constexpr __repr __make_repr(bool __has_val, _OtherUnion&& __other)
+ static constexpr __repr __make_repr(bool __has_val, _OtherUnion&& __other)
requires(__put_flag_in_tail)
{
if (__has_val)
@@ -391,8 +385,7 @@ class __expected_base {
protected:
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __expected_base(_Args&&... __args)
- : __repr_(in_place, std::forward<_Args>(__args)...) {}
+ constexpr explicit __expected_base(_Args&&... __args) : __repr_(in_place, std::forward<_Args>(__args)...) {}
// In case we copy/move construct from another `expected` we need to create
// our `expected` so that it either has a value or not, depending on the "has
@@ -414,12 +407,12 @@ class __expected_base {
// This constructor "catches" the first case and leaves the second case to
// `__union_t`, its constructors and `__make_union`.
template <class _OtherUnion>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __expected_base(bool __has_val, _OtherUnion&& __other)
+ constexpr explicit __expected_base(bool __has_val, _OtherUnion&& __other)
requires(__put_flag_in_tail)
: __repr_(__conditional_no_unique_address_invoke_tag{},
[&] { return __make_repr(__has_val, std::forward<_OtherUnion>(__other)); }) {}
- _LIBCPP_HIDE_FROM_ABI constexpr void __destroy() {
+ constexpr void __destroy() {
if constexpr (__put_flag_in_tail)
std::destroy_at(&__repr_.__v);
else
@@ -427,20 +420,20 @@ class __expected_base {
}
template <class _Tag, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr void __construct(_Tag __tag, _Args&&... __args) {
+ constexpr void __construct(_Tag __tag, _Args&&... __args) {
if constexpr (__put_flag_in_tail)
std::construct_at(&__repr_.__v, __tag, std::forward<_Args>(__args)...);
else
__repr_.__v.__construct_union(__tag, std::forward<_Args>(__args)...);
}
- _LIBCPP_HIDE_FROM_ABI constexpr bool __has_val() const { return __repr_.__v.__has_val_; }
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t& __union() { return __repr_.__v.__union_.__v; }
- _LIBCPP_HIDE_FROM_ABI constexpr const __union_t& __union() const { return __repr_.__v.__union_.__v; }
- _LIBCPP_HIDE_FROM_ABI constexpr _Tp& __val() { return __repr_.__v.__union_.__v.__val_; }
- _LIBCPP_HIDE_FROM_ABI constexpr const _Tp& __val() const { return __repr_.__v.__union_.__v.__val_; }
- _LIBCPP_HIDE_FROM_ABI constexpr _Err& __unex() { return __repr_.__v.__union_.__v.__unex_; }
- _LIBCPP_HIDE_FROM_ABI constexpr const _Err& __unex() const { return __repr_.__v.__union_.__v.__unex_; }
+ constexpr bool __has_val() const { return __repr_.__v.__has_val_; }
+ constexpr __union_t& __union() { return __repr_.__v.__union_.__v; }
+ constexpr const __union_t& __union() const { return __repr_.__v.__union_.__v; }
+ constexpr _Tp& __val() { return __repr_.__v.__union_.__v.__val_; }
+ constexpr const _Tp& __val() const { return __repr_.__v.__union_.__v.__val_; }
+ constexpr _Err& __unex() { return __repr_.__v.__union_.__v.__unex_; }
+ constexpr const _Err& __unex() const { return __repr_.__v.__union_.__v.__unex_; }
private:
_LIBCPP_NO_UNIQUE_ADDRESS __conditional_no_unique_address<__allow_reusing_expected_tail_padding, __repr> __repr_;
@@ -478,30 +471,30 @@ class expected : private __expected_base<_Tp, _Err> {
using rebind = expected<_Up, error_type>;
// [expected.object.ctor], constructors
- _LIBCPP_HIDE_FROM_ABI constexpr expected() noexcept(is_nothrow_default_constructible_v<_Tp>) // strengthened
+ constexpr expected() noexcept(is_nothrow_default_constructible_v<_Tp>) // strengthened
requires is_default_constructible_v<_Tp>
: __base(in_place) {}
- _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected&) = delete;
+ constexpr expected(const expected&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected&)
+ constexpr expected(const expected&)
requires(is_copy_constructible_v<_Tp> && is_copy_constructible_v<_Err> && is_trivially_copy_constructible_v<_Tp> &&
is_trivially_copy_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected& __other) noexcept(
+ constexpr expected(const expected& __other) noexcept(
is_nothrow_copy_constructible_v<_Tp> && is_nothrow_copy_constructible_v<_Err>) // strengthened
requires(is_copy_constructible_v<_Tp> && is_copy_constructible_v<_Err> &&
!(is_trivially_copy_constructible_v<_Tp> && is_trivially_copy_constructible_v<_Err>))
: __base(__other.__has_val(), __other.__union()) {}
- _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&&)
+ constexpr expected(expected&&)
requires(is_move_constructible_v<_Tp> && is_move_constructible_v<_Err> && is_trivially_move_constructible_v<_Tp> &&
is_trivially_move_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&& __other) noexcept(
- is_nothrow_move_constructible_v<_Tp> && is_nothrow_move_constructible_v<_Err>)
+ constexpr expected(expected&& __other) noexcept(is_nothrow_move_constructible_v<_Tp> &&
+ is_nothrow_move_constructible_v<_Err>)
requires(is_move_constructible_v<_Tp> && is_move_constructible_v<_Err> &&
!(is_trivially_move_constructible_v<_Tp> && is_trivially_move_constructible_v<_Err>))
: __base(__other.__has_val(), std::move(__other.__union())) {}
@@ -528,20 +521,18 @@ class expected : private __expected_base<_Tp, _Err> {
_Not<is_constructible<unexpected<_Err>, const expected<_Up, _OtherErr>>> >;
template <class _Func, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(
- std::__expected_construct_in_place_from_invoke_tag __tag, _Func&& __f, _Args&&... __args)
+ constexpr explicit expected(std::__expected_construct_in_place_from_invoke_tag __tag, _Func&& __f, _Args&&... __args)
: __base(__tag, std::forward<_Func>(__f), std::forward<_Args>(__args)...) {}
template <class _Func, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(
+ constexpr explicit expected(
std::__expected_construct_unexpected_from_invoke_tag __tag, _Func&& __f, _Args&&... __args)
: __base(__tag, std::forward<_Func>(__f), std::forward<_Args>(__args)...) {}
public:
template <class _Up, class _OtherErr>
requires __can_convert<_Up, _OtherErr, const _Up&, const _OtherErr&>::value
- _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<const _Up&, _Tp> ||
- !is_convertible_v<const _OtherErr&, _Err>)
+ constexpr explicit(!is_convertible_v<const _Up&, _Tp> || !is_convertible_v<const _OtherErr&, _Err>)
expected(const expected<_Up, _OtherErr>& __other) noexcept(
is_nothrow_constructible_v<_Tp, const _Up&> &&
is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened
@@ -549,7 +540,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Up, class _OtherErr>
requires __can_convert<_Up, _OtherErr, _Up, _OtherErr>::value
- _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_Up, _Tp> || !is_convertible_v<_OtherErr, _Err>)
+ constexpr explicit(!is_convertible_v<_Up, _Tp> || !is_convertible_v<_OtherErr, _Err>)
expected(expected<_Up, _OtherErr>&& __other) noexcept(
is_nothrow_constructible_v<_Tp, _Up> && is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened
: __base(__other.__has_val(), std::move(__other.__union())) {}
@@ -559,53 +550,53 @@ class expected : private __expected_base<_Tp, _Err> {
!is_same_v<remove_cvref_t<_Up>, unexpect_t> && is_constructible_v<_Tp, _Up> &&
!__is_std_unexpected<remove_cvref_t<_Up>>::value &&
(!is_same_v<remove_cv_t<_Tp>, bool> || !__is_std_expected<remove_cvref_t<_Up>>::value))
- _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_Up, _Tp>)
+ constexpr explicit(!is_convertible_v<_Up, _Tp>)
expected(_Up&& __u) noexcept(is_nothrow_constructible_v<_Tp, _Up>) // strengthened
: __base(in_place, std::forward<_Up>(__u)) {}
template <class _OtherErr>
requires is_constructible_v<_Err, const _OtherErr&>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<const _OtherErr&, _Err>) expected(
- const unexpected<_OtherErr>& __unex) noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened
+ constexpr explicit(!is_convertible_v<const _OtherErr&, _Err>) expected(const unexpected<_OtherErr>& __unex) noexcept(
+ is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened
: __base(unexpect, __unex.error()) {}
template <class _OtherErr>
requires is_constructible_v<_Err, _OtherErr>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>)
+ constexpr explicit(!is_convertible_v<_OtherErr, _Err>)
expected(unexpected<_OtherErr>&& __unex) noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened
: __base(unexpect, std::move(__unex.error())) {}
template <class... _Args>
requires is_constructible_v<_Tp, _Args...>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t, _Args&&... __args) noexcept(
- is_nothrow_constructible_v<_Tp, _Args...>) // strengthened
+ constexpr explicit expected(in_place_t,
+ _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>) // strengthened
: __base(in_place, std::forward<_Args>(__args)...) {}
template <class _Up, class... _Args>
requires is_constructible_v< _Tp, initializer_list<_Up>&, _Args... >
- _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(
+ constexpr explicit expected(in_place_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(
is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>) // strengthened
: __base(in_place, __il, std::forward<_Args>(__args)...) {}
template <class... _Args>
requires is_constructible_v<_Err, _Args...>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, _Args&&... __args) noexcept(
- is_nothrow_constructible_v<_Err, _Args...>) // strengthened
+ constexpr explicit expected(unexpect_t,
+ _Args&&... __args) noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened
: __base(unexpect, std::forward<_Args>(__args)...) {}
template <class _Up, class... _Args>
requires is_constructible_v< _Err, initializer_list<_Up>&, _Args... >
- _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(
+ constexpr explicit expected(unexpect_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(
is_nothrow_constructible_v<_Err, initializer_list<_Up>&, _Args...>) // strengthened
: __base(unexpect, __il, std::forward<_Args>(__args)...) {}
// [expected.object.dtor], destructor
- _LIBCPP_HIDE_FROM_ABI constexpr ~expected() = default;
+ constexpr ~expected() = default;
private:
template <class _Tag, class _OtherTag, class _T1, class _T2, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr void __reinit_expected(_T2& __oldval, _Args&&... __args) {
+ constexpr void __reinit_expected(_T2& __oldval, _Args&&... __args) {
if constexpr (is_nothrow_constructible_v<_T1, _Args...>) {
this->__destroy();
this->__construct(_Tag{}, std::forward<_Args>(__args)...);
@@ -628,9 +619,9 @@ class expected : private __expected_base<_Tp, _Err> {
public:
// [expected.object.assign], assignment
- _LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(const expected&) = delete;
+ constexpr expected& operator=(const expected&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(const expected& __rhs) noexcept(
+ constexpr expected& operator=(const expected& __rhs) noexcept(
is_nothrow_copy_assignable_v<_Tp> && is_nothrow_copy_constructible_v<_Tp> && is_nothrow_copy_assignable_v<_Err> &&
is_nothrow_copy_constructible_v<_Err>) // strengthened
requires(is_copy_assignable_v<_Tp> && is_copy_constructible_v<_Tp> && is_copy_assignable_v<_Err> &&
@@ -649,7 +640,7 @@ class expected : private __expected_base<_Tp, _Err> {
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr expected&
+ constexpr expected&
operator=(expected&& __rhs) noexcept(is_nothrow_move_assignable_v<_Tp> && is_nothrow_move_constructible_v<_Tp> &&
is_nothrow_move_assignable_v<_Err> && is_nothrow_move_constructible_v<_Err>)
requires(is_move_constructible_v<_Tp> && is_move_assignable_v<_Tp> && is_move_constructible_v<_Err> &&
@@ -669,7 +660,7 @@ class expected : private __expected_base<_Tp, _Err> {
}
template <class _Up = remove_cv_t<_Tp>>
- _LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(_Up&& __v)
+ constexpr expected& operator=(_Up&& __v)
requires(!is_same_v<expected, remove_cvref_t<_Up>> && !__is_std_unexpected<remove_cvref_t<_Up>>::value &&
is_constructible_v<_Tp, _Up> && is_assignable_v<_Tp&, _Up> &&
(is_nothrow_constructible_v<_Tp, _Up> || is_nothrow_move_constructible_v<_Tp> ||
@@ -695,7 +686,7 @@ class expected : private __expected_base<_Tp, _Err> {
public:
template <class _OtherErr>
requires(__can_assign_from_unexpected<const _OtherErr&>)
- _LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(const unexpected<_OtherErr>& __un) {
+ constexpr expected& operator=(const unexpected<_OtherErr>& __un) {
if (this->__has_val()) {
__reinit_expected<unexpect_t, in_place_t, _Err, _Tp>(this->__val(), __un.error());
} else {
@@ -706,7 +697,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _OtherErr>
requires(__can_assign_from_unexpected<_OtherErr>)
- _LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(unexpected<_OtherErr>&& __un) {
+ constexpr expected& operator=(unexpected<_OtherErr>&& __un) {
if (this->__has_val()) {
__reinit_expected<unexpect_t, in_place_t, _Err, _Tp>(this->__val(), std::move(__un.error()));
} else {
@@ -717,7 +708,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class... _Args>
requires is_nothrow_constructible_v<_Tp, _Args...>
- _LIBCPP_HIDE_FROM_ABI constexpr _Tp& emplace(_Args&&... __args) noexcept {
+ constexpr _Tp& emplace(_Args&&... __args) noexcept {
this->__destroy();
this->__construct(in_place, std::forward<_Args>(__args)...);
return this->__val();
@@ -725,7 +716,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Up, class... _Args>
requires is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>
- _LIBCPP_HIDE_FROM_ABI constexpr _Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) noexcept {
+ constexpr _Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) noexcept {
this->__destroy();
this->__construct(in_place, __il, std::forward<_Args>(__args)...);
return this->__val();
@@ -733,9 +724,8 @@ class expected : private __expected_base<_Tp, _Err> {
public:
// [expected.object.swap], swap
- _LIBCPP_HIDE_FROM_ABI constexpr void
- swap(expected& __rhs) noexcept(is_nothrow_move_constructible_v<_Tp> && is_nothrow_swappable_v<_Tp> &&
- is_nothrow_move_constructible_v<_Err> && is_nothrow_swappable_v<_Err>)
+ constexpr void swap(expected& __rhs) noexcept(is_nothrow_move_constructible_v<_Tp> && is_nothrow_swappable_v<_Tp> &&
+ is_nothrow_move_constructible_v<_Err> && is_nothrow_swappable_v<_Err>)
requires(is_swappable_v<_Tp> && is_swappable_v<_Err> && is_move_constructible_v<_Tp> &&
is_move_constructible_v<_Err> &&
(is_nothrow_move_constructible_v<_Tp> || is_nothrow_move_constructible_v<_Err>))
@@ -780,58 +770,58 @@ class expected : private __expected_base<_Tp, _Err> {
}
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr void swap(expected& __x, expected& __y) noexcept(noexcept(__x.swap(__y)))
+ friend constexpr void swap(expected& __x, expected& __y) noexcept(noexcept(__x.swap(__y)))
requires requires { __x.swap(__y); }
{
__x.swap(__y);
}
// [expected.object.obs], observers
- _LIBCPP_HIDE_FROM_ABI constexpr const _Tp* operator->() const noexcept {
+ constexpr const _Tp* operator->() const noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
this->__has_val(), "expected::operator-> requires the expected to contain a value");
return std::addressof(this->__val());
}
- _LIBCPP_HIDE_FROM_ABI constexpr _Tp* operator->() noexcept {
+ constexpr _Tp* operator->() noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
this->__has_val(), "expected::operator-> requires the expected to contain a value");
return std::addressof(this->__val());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Tp& operator*() const& noexcept {
+ [[nodiscard]] constexpr const _Tp& operator*() const& noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
this->__has_val(), "expected::operator* requires the expected to contain a value");
return this->__val();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp& operator*() & noexcept {
+ [[nodiscard]] constexpr _Tp& operator*() & noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
this->__has_val(), "expected::operator* requires the expected to contain a value");
return this->__val();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Tp&& operator*() const&& noexcept {
+ [[nodiscard]] constexpr const _Tp&& operator*() const&& noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
this->__has_val(), "expected::operator* requires the expected to contain a value");
return std::move(this->__val());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp&& operator*() && noexcept {
+ [[nodiscard]] constexpr _Tp&& operator*() && noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
this->__has_val(), "expected::operator* requires the expected to contain a value");
return std::move(this->__val());
}
- _LIBCPP_HIDE_FROM_ABI constexpr explicit operator bool() const noexcept { return this->__has_val(); }
+ constexpr explicit operator bool() const noexcept { return this->__has_val(); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool has_value() const noexcept { return this->__has_val(); }
+ [[nodiscard]] constexpr bool has_value() const noexcept { return this->__has_val(); }
# if _LIBCPP_STD_VER >= 29
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool has_error() const noexcept { return !this->has_value(); }
+ [[nodiscard]] constexpr bool has_error() const noexcept { return !this->has_value(); }
# endif
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Tp& value() const& {
+ [[nodiscard]] constexpr const _Tp& value() const& {
static_assert(is_copy_constructible_v<_Err>, "error_type has to be copy constructible");
if (!this->__has_val()) {
std::__throw_bad_expected_access<_Err>(std::as_const(error()));
@@ -839,7 +829,7 @@ class expected : private __expected_base<_Tp, _Err> {
return this->__val();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp& value() & {
+ [[nodiscard]] constexpr _Tp& value() & {
static_assert(is_copy_constructible_v<_Err>, "error_type has to be copy constructible");
if (!this->__has_val()) {
std::__throw_bad_expected_access<_Err>(std::as_const(error()));
@@ -847,7 +837,7 @@ class expected : private __expected_base<_Tp, _Err> {
return this->__val();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Tp&& value() const&& {
+ [[nodiscard]] constexpr const _Tp&& value() const&& {
static_assert(is_copy_constructible_v<_Err> && is_constructible_v<_Err, decltype(std::move(error()))>,
"error_type has to be both copy constructible and constructible from decltype(std::move(error()))");
if (!this->__has_val()) {
@@ -856,7 +846,7 @@ class expected : private __expected_base<_Tp, _Err> {
return std::move(this->__val());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp&& value() && {
+ [[nodiscard]] constexpr _Tp&& value() && {
static_assert(is_copy_constructible_v<_Err> && is_constructible_v<_Err, decltype(std::move(error()))>,
"error_type has to be both copy constructible and constructible from decltype(std::move(error()))");
if (!this->__has_val()) {
@@ -865,46 +855,46 @@ class expected : private __expected_base<_Tp, _Err> {
return std::move(this->__val());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Err& error() const& noexcept {
+ [[nodiscard]] constexpr const _Err& error() const& noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!this->__has_val(), "expected::error requires the expected to contain an error");
return this->__unex();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Err& error() & noexcept {
+ [[nodiscard]] constexpr _Err& error() & noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!this->__has_val(), "expected::error requires the expected to contain an error");
return this->__unex();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Err&& error() const&& noexcept {
+ [[nodiscard]] constexpr const _Err&& error() const&& noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!this->__has_val(), "expected::error requires the expected to contain an error");
return std::move(this->__unex());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Err&& error() && noexcept {
+ [[nodiscard]] constexpr _Err&& error() && noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!this->__has_val(), "expected::error requires the expected to contain an error");
return std::move(this->__unex());
}
template <class _Up = remove_cv_t<_Tp>>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp value_or(_Up&& __v) const& {
+ [[nodiscard]] constexpr _Tp value_or(_Up&& __v) const& {
static_assert(is_copy_constructible_v<_Tp>, "value_type has to be copy constructible");
static_assert(is_convertible_v<_Up, _Tp>, "argument has to be convertible to value_type");
return this->__has_val() ? this->__val() : static_cast<_Tp>(std::forward<_Up>(__v));
}
template <class _Up = remove_cv_t<_Tp>>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp value_or(_Up&& __v) && {
+ [[nodiscard]] constexpr _Tp value_or(_Up&& __v) && {
static_assert(is_move_constructible_v<_Tp>, "value_type has to be move constructible");
static_assert(is_convertible_v<_Up, _Tp>, "argument has to be convertible to value_type");
return this->__has_val() ? std::move(this->__val()) : static_cast<_Tp>(std::forward<_Up>(__v));
}
template <class _Up = _Err>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Err error_or(_Up&& __error) const& {
+ [[nodiscard]] constexpr _Err error_or(_Up&& __error) const& {
static_assert(is_copy_constructible_v<_Err>, "error_type has to be copy constructible");
static_assert(is_convertible_v<_Up, _Err>, "argument has to be convertible to error_type");
if (has_value())
@@ -913,7 +903,7 @@ class expected : private __expected_base<_Tp, _Err> {
}
template <class _Up = _Err>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Err error_or(_Up&& __error) && {
+ [[nodiscard]] constexpr _Err error_or(_Up&& __error) && {
static_assert(is_move_constructible_v<_Err>, "error_type has to be move constructible");
static_assert(is_convertible_v<_Up, _Err>, "argument has to be convertible to error_type");
if (has_value())
@@ -924,7 +914,7 @@ class expected : private __expected_base<_Tp, _Err> {
// [expected.void.monadic], monadic
template <class _Func>
requires is_constructible_v<_Err, _Err&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) & {
+ [[nodiscard]] constexpr auto and_then(_Func&& __f) & {
using _Up = remove_cvref_t<invoke_result_t<_Func, _Tp&>>;
static_assert(__is_std_expected<_Up>::value, "The result of f(value()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Up::error_type, _Err>,
@@ -937,7 +927,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Err, const _Err&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) const& {
+ [[nodiscard]] constexpr auto and_then(_Func&& __f) const& {
using _Up = remove_cvref_t<invoke_result_t<_Func, const _Tp&>>;
static_assert(__is_std_expected<_Up>::value, "The result of f(value()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Up::error_type, _Err>,
@@ -950,7 +940,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Err, _Err&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) && {
+ [[nodiscard]] constexpr auto and_then(_Func&& __f) && {
using _Up = remove_cvref_t<invoke_result_t<_Func, _Tp&&>>;
static_assert(
__is_std_expected<_Up>::value, "The result of f(std::move(value())) must be a specialization of std::expected");
@@ -964,7 +954,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Err, const _Err&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) const&& {
+ [[nodiscard]] constexpr auto and_then(_Func&& __f) const&& {
using _Up = remove_cvref_t<invoke_result_t<_Func, const _Tp&&>>;
static_assert(
__is_std_expected<_Up>::value, "The result of f(std::move(value())) must be a specialization of std::expected");
@@ -978,7 +968,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Tp, _Tp&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) & {
+ [[nodiscard]] constexpr auto or_else(_Func&& __f) & {
using _Gp = remove_cvref_t<invoke_result_t<_Func, _Err&>>;
static_assert(__is_std_expected<_Gp>::value, "The result of f(error()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
@@ -991,7 +981,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Tp, const _Tp&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) const& {
+ [[nodiscard]] constexpr auto or_else(_Func&& __f) const& {
using _Gp = remove_cvref_t<invoke_result_t<_Func, const _Err&>>;
static_assert(__is_std_expected<_Gp>::value, "The result of f(error()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
@@ -1004,7 +994,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Tp, _Tp&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) && {
+ [[nodiscard]] constexpr auto or_else(_Func&& __f) && {
using _Gp = remove_cvref_t<invoke_result_t<_Func, _Err&&>>;
static_assert(
__is_std_expected<_Gp>::value, "The result of f(std::move(error())) must be a specialization of std::expected");
@@ -1018,7 +1008,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Tp, const _Tp&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) const&& {
+ [[nodiscard]] constexpr auto or_else(_Func&& __f) const&& {
using _Gp = remove_cvref_t<invoke_result_t<_Func, const _Err&&>>;
static_assert(
__is_std_expected<_Gp>::value, "The result of f(std::move(error())) must be a specialization of std::expected");
@@ -1032,7 +1022,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Err, _Err&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform(_Func&& __f) & {
+ [[nodiscard]] constexpr auto transform(_Func&& __f) & {
using _Up = remove_cv_t<invoke_result_t<_Func, _Tp&>>;
if (!has_value()) {
return expected<_Up, _Err>(unexpect, error());
@@ -1048,7 +1038,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Err, const _Err&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform(_Func&& __f) const& {
+ [[nodiscard]] constexpr auto transform(_Func&& __f) const& {
using _Up = remove_cv_t<invoke_result_t<_Func, const _Tp&>>;
if (!has_value()) {
return expected<_Up, _Err>(unexpect, error());
@@ -1064,7 +1054,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Err, _Err&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform(_Func&& __f) && {
+ [[nodiscard]] constexpr auto transform(_Func&& __f) && {
using _Up = remove_cv_t<invoke_result_t<_Func, _Tp&&>>;
if (!has_value()) {
return expected<_Up, _Err>(unexpect, std::move(error()));
@@ -1080,7 +1070,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Err, const _Err&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform(_Func&& __f) const&& {
+ [[nodiscard]] constexpr auto transform(_Func&& __f) const&& {
using _Up = remove_cv_t<invoke_result_t<_Func, const _Tp&&>>;
if (!has_value()) {
return expected<_Up, _Err>(unexpect, std::move(error()));
@@ -1096,7 +1086,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Tp, _Tp&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform_error(_Func&& __f) & {
+ [[nodiscard]] constexpr auto transform_error(_Func&& __f) & {
using _Gp = remove_cv_t<invoke_result_t<_Func, _Err&>>;
static_assert(__valid_std_unexpected<_Gp>::value,
"The result of f(error()) must be a valid template argument for unexpected");
@@ -1108,7 +1098,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Tp, const _Tp&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform_error(_Func&& __f) const& {
+ [[nodiscard]] constexpr auto transform_error(_Func&& __f) const& {
using _Gp = remove_cv_t<invoke_result_t<_Func, const _Err&>>;
static_assert(__valid_std_unexpected<_Gp>::value,
"The result of f(error()) must be a valid template argument for unexpected");
@@ -1120,7 +1110,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Tp, _Tp&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform_error(_Func&& __f) && {
+ [[nodiscard]] constexpr auto transform_error(_Func&& __f) && {
using _Gp = remove_cv_t<invoke_result_t<_Func, _Err&&>>;
static_assert(__valid_std_unexpected<_Gp>::value,
"The result of f(std::move(error())) must be a valid template argument for unexpected");
@@ -1133,7 +1123,7 @@ class expected : private __expected_base<_Tp, _Err> {
template <class _Func>
requires is_constructible_v<_Tp, const _Tp&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform_error(_Func&& __f) const&& {
+ [[nodiscard]] constexpr auto transform_error(_Func&& __f) const&& {
using _Gp = remove_cv_t<invoke_result_t<_Func, const _Err&&>>;
static_assert(__valid_std_unexpected<_Gp>::value,
"The result of f(std::move(error())) must be a valid template argument for unexpected");
@@ -1146,12 +1136,12 @@ class expected : private __expected_base<_Tp, _Err> {
// [expected.object.eq], equality operators
template <class _T2, class _E2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const expected& __x, const expected<_T2, _E2>& __y)
+ friend constexpr bool operator==(const expected& __x, const expected<_T2, _E2>& __y)
requires(!is_void_v<_T2>)
# if _LIBCPP_STD_VER >= 26
&& requires {
- { *__x == *__y } -> __core_convertible_to<bool>;
- { __x.error() == __y.error() } -> __core_convertible_to<bool>;
+ { *__x == *__y }->__core_convertible_to<bool>;
+ { __x.error() == __y.error() }->__core_convertible_to<bool>;
}
# endif
{
@@ -1170,10 +1160,10 @@ class expected : private __expected_base<_Tp, _Err> {
// std::expected, see https://llvm.org/PR160431. Note that this only
// triggers with compilers that implement https://wg21.link/CWG2369.
template <class _T2, same_as<_Tp> _Tp2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const expected<_Tp2, _Err>& __x, const _T2& __v)
+ friend constexpr bool operator==(const expected<_Tp2, _Err>& __x, const _T2& __v)
# if _LIBCPP_STD_VER >= 26
requires(!__is_std_expected<_T2>::value) && requires {
- { *__x == __v } -> __core_convertible_to<bool>;
+ { *__x == __v }->__core_convertible_to<bool>;
}
# endif
{
@@ -1181,10 +1171,10 @@ class expected : private __expected_base<_Tp, _Err> {
}
template <class _E2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const expected& __x, const unexpected<_E2>& __e)
+ friend constexpr bool operator==(const expected& __x, const unexpected<_E2>& __e)
# if _LIBCPP_STD_VER >= 26
requires requires {
- { __x.error() == __e.error() } -> __core_convertible_to<bool>;
+ { __x.error() == __e.error() }->__core_convertible_to<bool>;
}
# endif
{
@@ -1200,34 +1190,32 @@ class __expected_void_base {
// it's not clear that it's implementable, given that the function is allowed to clobber
// the tail padding) - see https://github.com/itanium-cxx-abi/cxx-abi/issues/107.
union __union_t {
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&)
+ constexpr __union_t(const __union_t&) = delete;
+ constexpr __union_t(const __union_t&)
requires(is_copy_constructible_v<_Err> && is_trivially_copy_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t(__union_t&&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t(__union_t&&)
+ constexpr __union_t(__union_t&&) = delete;
+ constexpr __union_t(__union_t&&)
requires(is_move_constructible_v<_Err> && is_trivially_move_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(const __union_t&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(__union_t&&) = delete;
+ constexpr __union_t& operator=(const __union_t&) = delete;
+ constexpr __union_t& operator=(__union_t&&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(in_place_t) : __empty_() {}
+ constexpr explicit __union_t(in_place_t) : __empty_() {}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(unexpect_t, _Args&&... __args)
- : __unex_(std::forward<_Args>(__args)...) {}
+ constexpr explicit __union_t(unexpect_t, _Args&&... __args) : __unex_(std::forward<_Args>(__args)...) {}
template <class _Func, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(
- __expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args)
+ constexpr explicit __union_t(__expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args)
: __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {}
- _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t()
+ constexpr ~__union_t()
requires(is_trivially_destructible_v<_Err>)
= default;
// __repr's destructor handles this
- _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t()
+ constexpr ~__union_t()
requires(!is_trivially_destructible_v<_Err>)
{}
@@ -1239,63 +1227,62 @@ class __expected_void_base {
static constexpr bool __allow_reusing_expected_tail_padding = !__put_flag_in_tail;
struct __repr {
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr() = delete;
+ constexpr explicit __repr() = delete;
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr(in_place_t __tag) : __union_(in_place, __tag), __has_val_(true) {}
+ constexpr explicit __repr(in_place_t __tag) : __union_(in_place, __tag), __has_val_(true) {}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr(unexpect_t __tag, _Args&&... __args)
+ constexpr explicit __repr(unexpect_t __tag, _Args&&... __args)
: __union_(in_place, __tag, std::forward<_Args>(__args)...), __has_val_(false) {}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr(std::__expected_construct_unexpected_from_invoke_tag __tag,
- _Args&&... __args)
+ constexpr explicit __repr(std::__expected_construct_unexpected_from_invoke_tag __tag, _Args&&... __args)
: __union_(in_place, __tag, std::forward<_Args>(__args)...), __has_val_(false) {}
template <class _OtherUnion>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __repr(bool __has_val, _OtherUnion&& __other)
+ constexpr explicit __repr(bool __has_val, _OtherUnion&& __other)
requires(__allow_reusing_expected_tail_padding)
: __union_(__conditional_no_unique_address_invoke_tag{},
[&] { return __make_union(__has_val, std::forward<_OtherUnion>(__other)); }),
__has_val_(__has_val) {}
- _LIBCPP_HIDE_FROM_ABI constexpr __repr(const __repr&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __repr(const __repr&)
+ constexpr __repr(const __repr&) = delete;
+ constexpr __repr(const __repr&)
requires(is_copy_constructible_v<_Err> && is_trivially_copy_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr __repr(__repr&&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __repr(__repr&&)
+ constexpr __repr(__repr&&) = delete;
+ constexpr __repr(__repr&&)
requires(is_move_constructible_v<_Err> && is_trivially_move_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr __repr& operator=(const __repr&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr __repr& operator=(__repr&&) = delete;
+ constexpr __repr& operator=(const __repr&) = delete;
+ constexpr __repr& operator=(__repr&&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr ~__repr()
+ constexpr ~__repr()
requires(is_trivially_destructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr ~__repr()
+ constexpr ~__repr()
requires(!is_trivially_destructible_v<_Err>)
{
__destroy_union_member();
}
- _LIBCPP_HIDE_FROM_ABI constexpr void __destroy_union()
+ constexpr void __destroy_union()
requires(__allow_reusing_expected_tail_padding && is_trivially_destructible_v<_Err>)
{
std::destroy_at(&__union_.__v);
}
- _LIBCPP_HIDE_FROM_ABI constexpr void __destroy_union()
+ constexpr void __destroy_union()
requires(__allow_reusing_expected_tail_padding && !is_trivially_destructible_v<_Err>)
{
__destroy_union_member();
std::destroy_at(&__union_.__v);
}
- _LIBCPP_HIDE_FROM_ABI constexpr void __construct_union(in_place_t)
+ constexpr void __construct_union(in_place_t)
requires(__allow_reusing_expected_tail_padding)
{
std::construct_at(&__union_.__v, in_place);
@@ -1303,7 +1290,7 @@ class __expected_void_base {
}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr void __construct_union(unexpect_t, _Args&&... __args)
+ constexpr void __construct_union(unexpect_t, _Args&&... __args)
requires(__allow_reusing_expected_tail_padding)
{
std::construct_at(&__union_.__v, unexpect, std::forward<_Args>(__args)...);
@@ -1314,7 +1301,7 @@ class __expected_void_base {
template <class>
friend class __expected_void_base;
- _LIBCPP_HIDE_FROM_ABI constexpr void __destroy_union_member()
+ constexpr void __destroy_union_member()
requires(!is_trivially_destructible_v<_Err>)
{
if (!__has_val_)
@@ -1322,7 +1309,7 @@ class __expected_void_base {
}
template <class _OtherUnion>
- _LIBCPP_HIDE_FROM_ABI static constexpr __union_t __make_union(bool __has_val, _OtherUnion&& __other)
+ static constexpr __union_t __make_union(bool __has_val, _OtherUnion&& __other)
requires(__allow_reusing_expected_tail_padding)
{
if (__has_val)
@@ -1336,7 +1323,7 @@ class __expected_void_base {
};
template <class _OtherUnion>
- _LIBCPP_HIDE_FROM_ABI static constexpr __repr __make_repr(bool __has_val, _OtherUnion&& __other)
+ static constexpr __repr __make_repr(bool __has_val, _OtherUnion&& __other)
requires(__put_flag_in_tail)
{
if (__has_val)
@@ -1347,16 +1334,15 @@ class __expected_void_base {
protected:
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __expected_void_base(_Args&&... __args)
- : __repr_(in_place, std::forward<_Args>(__args)...) {}
+ constexpr explicit __expected_void_base(_Args&&... __args) : __repr_(in_place, std::forward<_Args>(__args)...) {}
template <class _OtherUnion>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __expected_void_base(bool __has_val, _OtherUnion&& __other)
+ constexpr explicit __expected_void_base(bool __has_val, _OtherUnion&& __other)
requires(__put_flag_in_tail)
: __repr_(__conditional_no_unique_address_invoke_tag{},
[&] { return __make_repr(__has_val, std::forward<_OtherUnion>(__other)); }) {}
- _LIBCPP_HIDE_FROM_ABI constexpr void __destroy() {
+ constexpr void __destroy() {
if constexpr (__put_flag_in_tail)
std::destroy_at(&__repr_.__v);
else
@@ -1364,18 +1350,18 @@ class __expected_void_base {
}
template <class _Tag, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr void __construct(_Tag __tag, _Args&&... __args) {
+ constexpr void __construct(_Tag __tag, _Args&&... __args) {
if constexpr (__put_flag_in_tail)
std::construct_at(&__repr_.__v, __tag, std::forward<_Args>(__args)...);
else
__repr_.__v.__construct_union(__tag, std::forward<_Args>(__args)...);
}
- _LIBCPP_HIDE_FROM_ABI constexpr bool __has_val() const { return __repr_.__v.__has_val_; }
- _LIBCPP_HIDE_FROM_ABI constexpr __union_t& __union() { return __repr_.__v.__union_.__v; }
- _LIBCPP_HIDE_FROM_ABI constexpr const __union_t& __union() const { return __repr_.__v.__union_.__v; }
- _LIBCPP_HIDE_FROM_ABI constexpr _Err& __unex() { return __repr_.__v.__union_.__v.__unex_; }
- _LIBCPP_HIDE_FROM_ABI constexpr const _Err& __unex() const { return __repr_.__v.__union_.__v.__unex_; }
+ constexpr bool __has_val() const { return __repr_.__v.__has_val_; }
+ constexpr __union_t& __union() { return __repr_.__v.__union_.__v; }
+ constexpr const __union_t& __union() const { return __repr_.__v.__union_.__v; }
+ constexpr _Err& __unex() { return __repr_.__v.__union_.__v.__unex_; }
+ constexpr const _Err& __unex() const { return __repr_.__v.__union_.__v.__unex_; }
private:
_LIBCPP_NO_UNIQUE_ADDRESS __conditional_no_unique_address<__allow_reusing_expected_tail_padding, __repr> __repr_;
@@ -1411,80 +1397,78 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
using rebind = expected<_Up, error_type>;
// [expected.void.ctor], constructors
- _LIBCPP_HIDE_FROM_ABI constexpr expected() noexcept : __base(in_place) {}
+ constexpr expected() noexcept : __base(in_place) {}
- _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected&) = delete;
+ constexpr expected(const expected&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected&)
+ constexpr expected(const expected&)
requires(is_copy_constructible_v<_Err> && is_trivially_copy_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected& __rhs) noexcept(
- is_nothrow_copy_constructible_v<_Err>) // strengthened
+ constexpr expected(const expected& __rhs) noexcept(is_nothrow_copy_constructible_v<_Err>) // strengthened
requires(is_copy_constructible_v<_Err> && !is_trivially_copy_constructible_v<_Err>)
: __base(__rhs.__has_val(), __rhs.__union()) {}
- _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&&)
+ constexpr expected(expected&&)
requires(is_move_constructible_v<_Err> && is_trivially_move_constructible_v<_Err>)
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&& __rhs) noexcept(is_nothrow_move_constructible_v<_Err>)
+ constexpr expected(expected&& __rhs) noexcept(is_nothrow_move_constructible_v<_Err>)
requires(is_move_constructible_v<_Err> && !is_trivially_move_constructible_v<_Err>)
: __base(__rhs.__has_val(), std::move(__rhs.__union())) {}
template <class _Up, class _OtherErr>
requires __can_convert<_Up, _OtherErr, const _OtherErr&>::value
- _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<const _OtherErr&, _Err>)
+ constexpr explicit(!is_convertible_v<const _OtherErr&, _Err>)
expected(const expected<_Up, _OtherErr>& __rhs) noexcept(
is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened
: __base(__rhs.__has_val(), __rhs.__union()) {}
template <class _Up, class _OtherErr>
requires __can_convert<_Up, _OtherErr, _OtherErr>::value
- _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>)
+ constexpr explicit(!is_convertible_v<_OtherErr, _Err>)
expected(expected<_Up, _OtherErr>&& __rhs) noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened
: __base(__rhs.__has_val(), std::move(__rhs.__union())) {}
template <class _OtherErr>
requires is_constructible_v<_Err, const _OtherErr&>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<const _OtherErr&, _Err>) expected(
- const unexpected<_OtherErr>& __unex) noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened
+ constexpr explicit(!is_convertible_v<const _OtherErr&, _Err>) expected(const unexpected<_OtherErr>& __unex) noexcept(
+ is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened
: __base(unexpect, __unex.error()) {}
template <class _OtherErr>
requires is_constructible_v<_Err, _OtherErr>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>)
+ constexpr explicit(!is_convertible_v<_OtherErr, _Err>)
expected(unexpected<_OtherErr>&& __unex) noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened
: __base(unexpect, std::move(__unex.error())) {}
- _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t) noexcept : __base(in_place) {}
+ constexpr explicit expected(in_place_t) noexcept : __base(in_place) {}
template <class... _Args>
requires is_constructible_v<_Err, _Args...>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, _Args&&... __args) noexcept(
- is_nothrow_constructible_v<_Err, _Args...>) // strengthened
+ constexpr explicit expected(unexpect_t,
+ _Args&&... __args) noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened
: __base(unexpect, std::forward<_Args>(__args)...) {}
template <class _Up, class... _Args>
requires is_constructible_v< _Err, initializer_list<_Up>&, _Args... >
- _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(
+ constexpr explicit expected(unexpect_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(
is_nothrow_constructible_v<_Err, initializer_list<_Up>&, _Args...>) // strengthened
: __base(unexpect, __il, std::forward<_Args>(__args)...) {}
private:
template <class _Func, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(
- __expected_construct_unexpected_from_invoke_tag __tag, _Func&& __f, _Args&&... __args)
+ constexpr explicit expected(__expected_construct_unexpected_from_invoke_tag __tag, _Func&& __f, _Args&&... __args)
: __base(__tag, std::forward<_Func>(__f), std::forward<_Args>(__args)...) {}
public:
// [expected.void.dtor], destructor
- _LIBCPP_HIDE_FROM_ABI constexpr ~expected() = default;
+ constexpr ~expected() = default;
private:
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr void __reinit_expected(unexpect_t, _Args&&... __args) {
+ constexpr void __reinit_expected(unexpect_t, _Args&&... __args) {
_LIBCPP_ASSERT_INTERNAL(this->__has_val(), "__reinit_expected(unexpect_t, ...) needs value to be set");
this->__destroy();
@@ -1493,7 +1477,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
__trans.__complete();
}
- _LIBCPP_HIDE_FROM_ABI constexpr void __reinit_expected(in_place_t) {
+ constexpr void __reinit_expected(in_place_t) {
_LIBCPP_ASSERT_INTERNAL(!this->__has_val(), "__reinit_expected(in_place_t, ...) needs value to be unset");
this->__destroy();
@@ -1502,9 +1486,9 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
public:
// [expected.void.assign], assignment
- _LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(const expected&) = delete;
+ constexpr expected& operator=(const expected&) = delete;
- _LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(const expected& __rhs) noexcept(
+ constexpr expected& operator=(const expected& __rhs) noexcept(
is_nothrow_copy_assignable_v<_Err> && is_nothrow_copy_constructible_v<_Err>) // strengthened
requires(is_copy_assignable_v<_Err> && is_copy_constructible_v<_Err>)
{
@@ -1522,7 +1506,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr expected&
+ constexpr expected&
operator=(expected&& __rhs) noexcept(is_nothrow_move_assignable_v<_Err> && is_nothrow_move_constructible_v<_Err>)
requires(is_move_assignable_v<_Err> && is_move_constructible_v<_Err>)
{
@@ -1542,7 +1526,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _OtherErr>
requires(is_constructible_v<_Err, const _OtherErr&> && is_assignable_v<_Err&, const _OtherErr&>)
- _LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(const unexpected<_OtherErr>& __un) {
+ constexpr expected& operator=(const unexpected<_OtherErr>& __un) {
if (this->__has_val()) {
__reinit_expected(unexpect, __un.error());
} else {
@@ -1553,7 +1537,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _OtherErr>
requires(is_constructible_v<_Err, _OtherErr> && is_assignable_v<_Err&, _OtherErr>)
- _LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(unexpected<_OtherErr>&& __un) {
+ constexpr expected& operator=(unexpected<_OtherErr>&& __un) {
if (this->__has_val()) {
__reinit_expected(unexpect, std::move(__un.error()));
} else {
@@ -1562,15 +1546,14 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr void emplace() noexcept {
+ constexpr void emplace() noexcept {
if (!this->__has_val()) {
__reinit_expected(in_place);
}
}
// [expected.void.swap], swap
- _LIBCPP_HIDE_FROM_ABI constexpr void
- swap(expected& __rhs) noexcept(is_nothrow_move_constructible_v<_Err> && is_nothrow_swappable_v<_Err>)
+ constexpr void swap(expected& __rhs) noexcept(is_nothrow_move_constructible_v<_Err> && is_nothrow_swappable_v<_Err>)
requires(is_swappable_v<_Err> && is_move_constructible_v<_Err>)
{
auto __swap_val_unex_impl = [](expected& __with_val, expected& __with_err) {
@@ -1594,66 +1577,66 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr void swap(expected& __x, expected& __y) noexcept(noexcept(__x.swap(__y)))
+ friend constexpr void swap(expected& __x, expected& __y) noexcept(noexcept(__x.swap(__y)))
requires requires { __x.swap(__y); }
{
__x.swap(__y);
}
// [expected.void.obs], observers
- _LIBCPP_HIDE_FROM_ABI constexpr explicit operator bool() const noexcept { return this->__has_val(); }
+ constexpr explicit operator bool() const noexcept { return this->__has_val(); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool has_value() const noexcept { return this->__has_val(); }
+ [[nodiscard]] constexpr bool has_value() const noexcept { return this->__has_val(); }
# if _LIBCPP_STD_VER >= 29
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool has_error() const noexcept { return !this->has_value(); }
+ [[nodiscard]] constexpr bool has_error() const noexcept { return !this->has_value(); }
# endif
- _LIBCPP_HIDE_FROM_ABI constexpr void operator*() const noexcept {
+ constexpr void operator*() const noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
this->__has_val(), "expected::operator* requires the expected to contain a value");
}
- _LIBCPP_HIDE_FROM_ABI constexpr void value() const& {
+ constexpr void value() const& {
static_assert(is_copy_constructible_v<_Err>);
if (!this->__has_val()) {
std::__throw_bad_expected_access<_Err>(this->__unex());
}
}
- _LIBCPP_HIDE_FROM_ABI constexpr void value() && {
+ constexpr void value() && {
static_assert(is_copy_constructible_v<_Err> && is_move_constructible_v<_Err>);
if (!this->__has_val()) {
std::__throw_bad_expected_access<_Err>(std::move(this->__unex()));
}
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Err& error() const& noexcept {
+ [[nodiscard]] constexpr const _Err& error() const& noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!this->__has_val(), "expected::error requires the expected to contain an error");
return this->__unex();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Err& error() & noexcept {
+ [[nodiscard]] constexpr _Err& error() & noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!this->__has_val(), "expected::error requires the expected to contain an error");
return this->__unex();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Err&& error() const&& noexcept {
+ [[nodiscard]] constexpr const _Err&& error() const&& noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!this->__has_val(), "expected::error requires the expected to contain an error");
return std::move(this->__unex());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Err&& error() && noexcept {
+ [[nodiscard]] constexpr _Err&& error() && noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!this->__has_val(), "expected::error requires the expected to contain an error");
return std::move(this->__unex());
}
template <class _Up = _Err>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Err error_or(_Up&& __error) const& {
+ [[nodiscard]] constexpr _Err error_or(_Up&& __error) const& {
static_assert(is_copy_constructible_v<_Err>, "error_type has to be copy constructible");
static_assert(is_convertible_v<_Up, _Err>, "argument has to be convertible to error_type");
if (has_value()) {
@@ -1663,7 +1646,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
template <class _Up = _Err>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Err error_or(_Up&& __error) && {
+ [[nodiscard]] constexpr _Err error_or(_Up&& __error) && {
static_assert(is_move_constructible_v<_Err>, "error_type has to be move constructible");
static_assert(is_convertible_v<_Up, _Err>, "argument has to be convertible to error_type");
if (has_value()) {
@@ -1675,7 +1658,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
// [expected.void.monadic], monadic
template <class _Func>
requires is_constructible_v<_Err, _Err&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) & {
+ [[nodiscard]] constexpr auto and_then(_Func&& __f) & {
using _Up = remove_cvref_t<invoke_result_t<_Func>>;
static_assert(__is_std_expected<_Up>::value, "The result of f() must be a specialization of std::expected");
static_assert(
@@ -1688,7 +1671,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _Func>
requires is_constructible_v<_Err, const _Err&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) const& {
+ [[nodiscard]] constexpr auto and_then(_Func&& __f) const& {
using _Up = remove_cvref_t<invoke_result_t<_Func>>;
static_assert(__is_std_expected<_Up>::value, "The result of f() must be a specialization of std::expected");
static_assert(
@@ -1701,7 +1684,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _Func>
requires is_constructible_v<_Err, _Err&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) && {
+ [[nodiscard]] constexpr auto and_then(_Func&& __f) && {
using _Up = remove_cvref_t<invoke_result_t<_Func>>;
static_assert(__is_std_expected<_Up>::value, "The result of f() must be a specialization of std::expected");
static_assert(
@@ -1714,7 +1697,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _Func>
requires is_constructible_v<_Err, const _Err&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto and_then(_Func&& __f) const&& {
+ [[nodiscard]] constexpr auto and_then(_Func&& __f) const&& {
using _Up = remove_cvref_t<invoke_result_t<_Func>>;
static_assert(__is_std_expected<_Up>::value, "The result of f() must be a specialization of std::expected");
static_assert(
@@ -1726,7 +1709,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
template <class _Func>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) & {
+ [[nodiscard]] constexpr auto or_else(_Func&& __f) & {
using _Gp = remove_cvref_t<invoke_result_t<_Func, _Err&>>;
static_assert(__is_std_expected<_Gp>::value, "The result of f(error()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
@@ -1738,7 +1721,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
template <class _Func>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) const& {
+ [[nodiscard]] constexpr auto or_else(_Func&& __f) const& {
using _Gp = remove_cvref_t<invoke_result_t<_Func, const _Err&>>;
static_assert(__is_std_expected<_Gp>::value, "The result of f(error()) must be a specialization of std::expected");
static_assert(is_same_v<typename _Gp::value_type, _Tp>,
@@ -1750,7 +1733,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
template <class _Func>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) && {
+ [[nodiscard]] constexpr auto or_else(_Func&& __f) && {
using _Gp = remove_cvref_t<invoke_result_t<_Func, _Err&&>>;
static_assert(
__is_std_expected<_Gp>::value, "The result of f(std::move(error())) must be a specialization of std::expected");
@@ -1763,7 +1746,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
template <class _Func>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto or_else(_Func&& __f) const&& {
+ [[nodiscard]] constexpr auto or_else(_Func&& __f) const&& {
using _Gp = remove_cvref_t<invoke_result_t<_Func, const _Err&&>>;
static_assert(
__is_std_expected<_Gp>::value, "The result of f(std::move(error())) must be a specialization of std::expected");
@@ -1777,7 +1760,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _Func>
requires is_constructible_v<_Err, _Err&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform(_Func&& __f) & {
+ [[nodiscard]] constexpr auto transform(_Func&& __f) & {
using _Up = remove_cv_t<invoke_result_t<_Func>>;
if (!has_value()) {
return expected<_Up, _Err>(unexpect, error());
@@ -1792,7 +1775,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _Func>
requires is_constructible_v<_Err, const _Err&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform(_Func&& __f) const& {
+ [[nodiscard]] constexpr auto transform(_Func&& __f) const& {
using _Up = remove_cv_t<invoke_result_t<_Func>>;
if (!has_value()) {
return expected<_Up, _Err>(unexpect, error());
@@ -1807,7 +1790,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _Func>
requires is_constructible_v<_Err, _Err&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform(_Func&& __f) && {
+ [[nodiscard]] constexpr auto transform(_Func&& __f) && {
using _Up = remove_cv_t<invoke_result_t<_Func>>;
if (!has_value()) {
return expected<_Up, _Err>(unexpect, std::move(error()));
@@ -1822,7 +1805,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
template <class _Func>
requires is_constructible_v<_Err, const _Err&&>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform(_Func&& __f) const&& {
+ [[nodiscard]] constexpr auto transform(_Func&& __f) const&& {
using _Up = remove_cv_t<invoke_result_t<_Func>>;
if (!has_value()) {
return expected<_Up, _Err>(unexpect, std::move(error()));
@@ -1836,7 +1819,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
template <class _Func>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform_error(_Func&& __f) & {
+ [[nodiscard]] constexpr auto transform_error(_Func&& __f) & {
using _Gp = remove_cv_t<invoke_result_t<_Func, _Err&>>;
static_assert(__valid_std_unexpected<_Gp>::value,
"The result of f(error()) must be a valid template argument for unexpected");
@@ -1847,7 +1830,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
template <class _Func>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform_error(_Func&& __f) const& {
+ [[nodiscard]] constexpr auto transform_error(_Func&& __f) const& {
using _Gp = remove_cv_t<invoke_result_t<_Func, const _Err&>>;
static_assert(__valid_std_unexpected<_Gp>::value,
"The result of f(error()) must be a valid template argument for unexpected");
@@ -1858,7 +1841,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
template <class _Func>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform_error(_Func&& __f) && {
+ [[nodiscard]] constexpr auto transform_error(_Func&& __f) && {
using _Gp = remove_cv_t<invoke_result_t<_Func, _Err&&>>;
static_assert(__valid_std_unexpected<_Gp>::value,
"The result of f(std::move(error())) must be a valid template argument for unexpected");
@@ -1870,7 +1853,7 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
template <class _Func>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto transform_error(_Func&& __f) const&& {
+ [[nodiscard]] constexpr auto transform_error(_Func&& __f) const&& {
using _Gp = remove_cv_t<invoke_result_t<_Func, const _Err&&>>;
static_assert(__valid_std_unexpected<_Gp>::value,
"The result of f(std::move(error())) must be a valid template argument for unexpected");
@@ -1884,10 +1867,10 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
// [expected.void.eq], equality operators
template <class _T2, class _E2>
requires is_void_v<_T2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const expected& __x, const expected<_T2, _E2>& __y)
+ friend constexpr bool operator==(const expected& __x, const expected<_T2, _E2>& __y)
# if _LIBCPP_STD_VER >= 26
requires requires {
- { __x.error() == __y.error() } -> __core_convertible_to<bool>;
+ { __x.error() == __y.error() }->__core_convertible_to<bool>;
}
# endif
{
@@ -1899,10 +1882,10 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
}
template <class _E2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const expected& __x, const unexpected<_E2>& __y)
+ friend constexpr bool operator==(const expected& __x, const unexpected<_E2>& __y)
# if _LIBCPP_STD_VER >= 26
requires requires {
- { __x.error() == __y.error() } -> __core_convertible_to<bool>;
+ { __x.error() == __y.error() }->__core_convertible_to<bool>;
}
# endif
{
diff --git a/libcxx/include/__expected/unexpected.h b/libcxx/include/__expected/unexpected.h
index fc4f52ce14adce..ba12397da2553f 100644
--- a/libcxx/include/__expected/unexpected.h
+++ b/libcxx/include/__expected/unexpected.h
@@ -63,51 +63,51 @@ class unexpected {
"array type, a specialization of unexpected, or a cv-qualified type is ill-formed.");
public:
- _LIBCPP_HIDE_FROM_ABI constexpr unexpected(const unexpected&) = default;
- _LIBCPP_HIDE_FROM_ABI constexpr unexpected(unexpected&&) = default;
+ constexpr unexpected(const unexpected&) = default;
+ constexpr unexpected(unexpected&&) = default;
template <class _Error = _Err>
requires(!is_same_v<remove_cvref_t<_Error>, unexpected> && //
!is_same_v<remove_cvref_t<_Error>, in_place_t> && //
is_constructible_v<_Err, _Error>)
- _LIBCPP_HIDE_FROM_ABI constexpr explicit unexpected(_Error&& __error) //
- noexcept(is_nothrow_constructible_v<_Err, _Error>) // strengthened
+ constexpr explicit unexpected(_Error&& __error) //
+ noexcept(is_nothrow_constructible_v<_Err, _Error>) // strengthened
: __unex_(std::forward<_Error>(__error)) {}
template <class... _Args>
requires is_constructible_v<_Err, _Args...>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit unexpected(in_place_t, _Args&&... __args) //
- noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened
+ constexpr explicit unexpected(in_place_t, _Args&&... __args) //
+ noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened
: __unex_(std::forward<_Args>(__args)...) {}
template <class _Up, class... _Args>
requires is_constructible_v<_Err, initializer_list<_Up>&, _Args...>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit unexpected(in_place_t, initializer_list<_Up> __il, _Args&&... __args) //
- noexcept(is_nothrow_constructible_v<_Err, initializer_list<_Up>&, _Args...>) // strengthened
+ constexpr explicit unexpected(in_place_t, initializer_list<_Up> __il, _Args&&... __args) //
+ noexcept(is_nothrow_constructible_v<_Err, initializer_list<_Up>&, _Args...>) // strengthened
: __unex_(__il, std::forward<_Args>(__args)...) {}
- _LIBCPP_HIDE_FROM_ABI constexpr unexpected& operator=(const unexpected&) = default;
- _LIBCPP_HIDE_FROM_ABI constexpr unexpected& operator=(unexpected&&) = default;
+ constexpr unexpected& operator=(const unexpected&) = default;
+ constexpr unexpected& operator=(unexpected&&) = default;
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Err& error() const& noexcept { return __unex_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Err& error() & noexcept { return __unex_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Err&& error() const&& noexcept { return std::move(__unex_); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Err&& error() && noexcept { return std::move(__unex_); }
+ [[nodiscard]] constexpr const _Err& error() const& noexcept { return __unex_; }
+ [[nodiscard]] constexpr _Err& error() & noexcept { return __unex_; }
+ [[nodiscard]] constexpr const _Err&& error() const&& noexcept { return std::move(__unex_); }
+ [[nodiscard]] constexpr _Err&& error() && noexcept { return std::move(__unex_); }
- _LIBCPP_HIDE_FROM_ABI constexpr void swap(unexpected& __other) noexcept(is_nothrow_swappable_v<_Err>) {
+ constexpr void swap(unexpected& __other) noexcept(is_nothrow_swappable_v<_Err>) {
static_assert(is_swappable_v<_Err>, "unexpected::swap requires is_swappable_v<E> to be true");
using std::swap;
swap(__unex_, __other.__unex_);
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr void swap(unexpected& __x, unexpected& __y) noexcept(noexcept(__x.swap(__y)))
+ friend constexpr void swap(unexpected& __x, unexpected& __y) noexcept(noexcept(__x.swap(__y)))
requires is_swappable_v<_Err>
{
__x.swap(__y);
}
template <class _Err2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const unexpected& __x, const unexpected<_Err2>& __y) {
+ friend constexpr bool operator==(const unexpected& __x, const unexpected<_Err2>& __y) {
return __x.__unex_ == __y.error();
}
diff --git a/libcxx/include/__filesystem/copy_options.h b/libcxx/include/__filesystem/copy_options.h
index d9039a6492fc2b..90c2eab0e711c0 100644
--- a/libcxx/include/__filesystem/copy_options.h
+++ b/libcxx/include/__filesystem/copy_options.h
@@ -34,33 +34,27 @@ enum class copy_options : unsigned short {
__in_recursive_copy = 512,
};
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr copy_options operator&(copy_options __lhs, copy_options __rhs) {
+[[nodiscard]] inline constexpr copy_options operator&(copy_options __lhs, copy_options __rhs) {
return static_cast<copy_options>(static_cast<unsigned short>(__lhs) & static_cast<unsigned short>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr copy_options operator|(copy_options __lhs, copy_options __rhs) {
+[[nodiscard]] inline constexpr copy_options operator|(copy_options __lhs, copy_options __rhs) {
return static_cast<copy_options>(static_cast<unsigned short>(__lhs) | static_cast<unsigned short>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr copy_options operator^(copy_options __lhs, copy_options __rhs) {
+[[nodiscard]] inline constexpr copy_options operator^(copy_options __lhs, copy_options __rhs) {
return static_cast<copy_options>(static_cast<unsigned short>(__lhs) ^ static_cast<unsigned short>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr copy_options operator~(copy_options __lhs) {
+[[nodiscard]] inline constexpr copy_options operator~(copy_options __lhs) {
return static_cast<copy_options>(~static_cast<unsigned short>(__lhs));
}
-_LIBCPP_HIDE_FROM_ABI inline copy_options& operator&=(copy_options& __lhs, copy_options __rhs) {
- return __lhs = __lhs & __rhs;
-}
+inline copy_options& operator&=(copy_options& __lhs, copy_options __rhs) { return __lhs = __lhs & __rhs; }
-_LIBCPP_HIDE_FROM_ABI inline copy_options& operator|=(copy_options& __lhs, copy_options __rhs) {
- return __lhs = __lhs | __rhs;
-}
+inline copy_options& operator|=(copy_options& __lhs, copy_options __rhs) { return __lhs = __lhs | __rhs; }
-_LIBCPP_HIDE_FROM_ABI inline copy_options& operator^=(copy_options& __lhs, copy_options __rhs) {
- return __lhs = __lhs ^ __rhs;
-}
+inline copy_options& operator^=(copy_options& __lhs, copy_options __rhs) { return __lhs = __lhs ^ __rhs; }
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/directory_options.h b/libcxx/include/__filesystem/directory_options.h
index 11c7d204ea824c..1770159f8859b3 100644
--- a/libcxx/include/__filesystem/directory_options.h
+++ b/libcxx/include/__filesystem/directory_options.h
@@ -22,34 +22,31 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
enum class directory_options : unsigned char { none = 0, follow_directory_symlink = 1, skip_permission_denied = 2 };
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr directory_options
-operator&(directory_options __lhs, directory_options __rhs) {
+[[nodiscard]] inline constexpr directory_options operator&(directory_options __lhs, directory_options __rhs) {
return static_cast<directory_options>(static_cast<unsigned char>(__lhs) & static_cast<unsigned char>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr directory_options
-operator|(directory_options __lhs, directory_options __rhs) {
+[[nodiscard]] inline constexpr directory_options operator|(directory_options __lhs, directory_options __rhs) {
return static_cast<directory_options>(static_cast<unsigned char>(__lhs) | static_cast<unsigned char>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr directory_options
-operator^(directory_options __lhs, directory_options __rhs) {
+[[nodiscard]] inline constexpr directory_options operator^(directory_options __lhs, directory_options __rhs) {
return static_cast<directory_options>(static_cast<unsigned char>(__lhs) ^ static_cast<unsigned char>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr directory_options operator~(directory_options __lhs) {
+[[nodiscard]] inline constexpr directory_options operator~(directory_options __lhs) {
return static_cast<directory_options>(~static_cast<unsigned char>(__lhs));
}
-_LIBCPP_HIDE_FROM_ABI inline directory_options& operator&=(directory_options& __lhs, directory_options __rhs) {
+inline directory_options& operator&=(directory_options& __lhs, directory_options __rhs) {
return __lhs = __lhs & __rhs;
}
-_LIBCPP_HIDE_FROM_ABI inline directory_options& operator|=(directory_options& __lhs, directory_options __rhs) {
+inline directory_options& operator|=(directory_options& __lhs, directory_options __rhs) {
return __lhs = __lhs | __rhs;
}
-_LIBCPP_HIDE_FROM_ABI inline directory_options& operator^=(directory_options& __lhs, directory_options __rhs) {
+inline directory_options& operator^=(directory_options& __lhs, directory_options __rhs) {
return __lhs = __lhs ^ __rhs;
}
diff --git a/libcxx/include/__filesystem/file_status.h b/libcxx/include/__filesystem/file_status.h
index 746cd0f9a680c4..3acb72f6c0fcf5 100644
--- a/libcxx/include/__filesystem/file_status.h
+++ b/libcxx/include/__filesystem/file_status.h
@@ -25,31 +25,30 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
class file_status {
public:
// constructors
- _LIBCPP_HIDE_FROM_ABI file_status() noexcept : file_status(file_type::none) {}
- _LIBCPP_HIDE_FROM_ABI explicit file_status(file_type __ft, perms __prms = perms::unknown) noexcept
- : __ft_(__ft), __prms_(__prms) {}
+ file_status() noexcept : file_status(file_type::none) {}
+ explicit file_status(file_type __ft, perms __prms = perms::unknown) noexcept : __ft_(__ft), __prms_(__prms) {}
- _LIBCPP_HIDE_FROM_ABI file_status(const file_status&) noexcept = default;
- _LIBCPP_HIDE_FROM_ABI file_status(file_status&&) noexcept = default;
+ file_status(const file_status&) noexcept = default;
+ file_status(file_status&&) noexcept = default;
- _LIBCPP_HIDE_FROM_ABI ~file_status() {}
+ ~file_status() {}
- _LIBCPP_HIDE_FROM_ABI file_status& operator=(const file_status&) noexcept = default;
- _LIBCPP_HIDE_FROM_ABI file_status& operator=(file_status&&) noexcept = default;
+ file_status& operator=(const file_status&) noexcept = default;
+ file_status& operator=(file_status&&) noexcept = default;
// observers
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI file_type type() const noexcept { return __ft_; }
+ [[nodiscard]] file_type type() const noexcept { return __ft_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI perms permissions() const noexcept { return __prms_; }
+ [[nodiscard]] perms permissions() const noexcept { return __prms_; }
// modifiers
- _LIBCPP_HIDE_FROM_ABI void type(file_type __ft) noexcept { __ft_ = __ft; }
+ void type(file_type __ft) noexcept { __ft_ = __ft; }
- _LIBCPP_HIDE_FROM_ABI void permissions(perms __p) noexcept { __prms_ = __p; }
+ void permissions(perms __p) noexcept { __prms_ = __p; }
# if _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI friend bool operator==(const file_status& __lhs, const file_status& __rhs) noexcept {
+ friend bool operator==(const file_status& __lhs, const file_status& __rhs) noexcept {
return __lhs.type() == __rhs.type() && __lhs.permissions() == __rhs.permissions();
}
diff --git a/libcxx/include/__filesystem/operations.h b/libcxx/include/__filesystem/operations.h
index 77b6e1908066d0..0fa003a0c8d254 100644
--- a/libcxx/include/__filesystem/operations.h
+++ b/libcxx/include/__filesystem/operations.h
@@ -70,201 +70,142 @@ _LIBCPP_EXPORTED_FROM_ABI void __permissions(const path&, perms, perm_options, e
_LIBCPP_EXPORTED_FROM_ABI space_info __space(const path&, error_code* __ec = nullptr);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p) { return __absolute(__p); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p, error_code& __ec) {
- return __absolute(__p, &__ec);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path canonical(const path& __p) { return __canonical(__p); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path canonical(const path& __p, error_code& __ec) {
- return __canonical(__p, &__ec);
-}
-inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to) {
- return __copy_file(__from, __to, copy_options::none);
-}
-inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, error_code& __ec) {
+[[nodiscard]] inline path absolute(const path& __p) { return __absolute(__p); }
+[[nodiscard]] inline path absolute(const path& __p, error_code& __ec) { return __absolute(__p, &__ec); }
+[[nodiscard]] inline path canonical(const path& __p) { return __canonical(__p); }
+[[nodiscard]] inline path canonical(const path& __p, error_code& __ec) { return __canonical(__p, &__ec); }
+inline bool copy_file(const path& __from, const path& __to) { return __copy_file(__from, __to, copy_options::none); }
+inline bool copy_file(const path& __from, const path& __to, error_code& __ec) {
return __copy_file(__from, __to, copy_options::none, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, copy_options __opt) {
+inline bool copy_file(const path& __from, const path& __to, copy_options __opt) {
return __copy_file(__from, __to, __opt);
}
-inline _LIBCPP_HIDE_FROM_ABI bool
-copy_file(const path& __from, const path& __to, copy_options __opt, error_code& __ec) {
+inline bool copy_file(const path& __from, const path& __to, copy_options __opt, error_code& __ec) {
return __copy_file(__from, __to, __opt, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI void copy_symlink(const path& __from, const path& __to) { __copy_symlink(__from, __to); }
-inline _LIBCPP_HIDE_FROM_ABI void copy_symlink(const path& __from, const path& __to, error_code& __ec) noexcept {
+inline void copy_symlink(const path& __from, const path& __to) { __copy_symlink(__from, __to); }
+inline void copy_symlink(const path& __from, const path& __to, error_code& __ec) noexcept {
__copy_symlink(__from, __to, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to) {
- __copy(__from, __to, copy_options::none);
-}
-inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, error_code& __ec) {
+inline void copy(const path& __from, const path& __to) { __copy(__from, __to, copy_options::none); }
+inline void copy(const path& __from, const path& __to, error_code& __ec) {
__copy(__from, __to, copy_options::none, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, copy_options __opt) {
- __copy(__from, __to, __opt);
-}
-inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, copy_options __opt, error_code& __ec) {
+inline void copy(const path& __from, const path& __to, copy_options __opt) { __copy(__from, __to, __opt); }
+inline void copy(const path& __from, const path& __to, copy_options __opt, error_code& __ec) {
__copy(__from, __to, __opt, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI bool create_directories(const path& __p) { return __create_directories(__p); }
-inline _LIBCPP_HIDE_FROM_ABI bool create_directories(const path& __p, error_code& __ec) {
- return __create_directories(__p, &__ec);
-}
-inline _LIBCPP_HIDE_FROM_ABI void create_directory_symlink(const path& __target, const path& __link) {
+inline bool create_directories(const path& __p) { return __create_directories(__p); }
+inline bool create_directories(const path& __p, error_code& __ec) { return __create_directories(__p, &__ec); }
+inline void create_directory_symlink(const path& __target, const path& __link) {
__create_directory_symlink(__target, __link);
}
-inline _LIBCPP_HIDE_FROM_ABI void
-create_directory_symlink(const path& __target, const path& __link, error_code& __ec) noexcept {
+inline void create_directory_symlink(const path& __target, const path& __link, error_code& __ec) noexcept {
__create_directory_symlink(__target, __link, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p) { return __create_directory(__p); }
-inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, error_code& __ec) noexcept {
- return __create_directory(__p, &__ec);
-}
-inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, const path& __attrs) {
- return __create_directory(__p, __attrs);
-}
-inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, const path& __attrs, error_code& __ec) noexcept {
+inline bool create_directory(const path& __p) { return __create_directory(__p); }
+inline bool create_directory(const path& __p, error_code& __ec) noexcept { return __create_directory(__p, &__ec); }
+inline bool create_directory(const path& __p, const path& __attrs) { return __create_directory(__p, __attrs); }
+inline bool create_directory(const path& __p, const path& __attrs, error_code& __ec) noexcept {
return __create_directory(__p, __attrs, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI void create_hard_link(const path& __target, const path& __link) {
- __create_hard_link(__target, __link);
-}
-inline _LIBCPP_HIDE_FROM_ABI void
-create_hard_link(const path& __target, const path& __link, error_code& __ec) noexcept {
+inline void create_hard_link(const path& __target, const path& __link) { __create_hard_link(__target, __link); }
+inline void create_hard_link(const path& __target, const path& __link, error_code& __ec) noexcept {
__create_hard_link(__target, __link, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI void create_symlink(const path& __target, const path& __link) {
- __create_symlink(__target, __link);
-}
-inline _LIBCPP_HIDE_FROM_ABI void create_symlink(const path& __target, const path& __link, error_code& __ec) noexcept {
+inline void create_symlink(const path& __target, const path& __link) { __create_symlink(__target, __link); }
+inline void create_symlink(const path& __target, const path& __link, error_code& __ec) noexcept {
return __create_symlink(__target, __link, &__ec);
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path current_path() { return __current_path(); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path current_path(error_code& __ec) { return __current_path(&__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void current_path(const path& __p) { __current_path(__p); }
-inline _LIBCPP_HIDE_FROM_ABI void current_path(const path& __p, error_code& __ec) noexcept {
- __current_path(__p, &__ec);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool equivalent(const path& __p1, const path& __p2) {
- return __equivalent(__p1, __p2);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool
-equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept {
+[[nodiscard]] inline path current_path() { return __current_path(); }
+[[nodiscard]] inline path current_path(error_code& __ec) { return __current_path(&__ec); }
+inline void current_path(const path& __p) { __current_path(__p); }
+inline void current_path(const path& __p, error_code& __ec) noexcept { __current_path(__p, &__ec); }
+[[nodiscard]] inline bool equivalent(const path& __p1, const path& __p2) { return __equivalent(__p1, __p2); }
+[[nodiscard]] inline bool equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept {
return __equivalent(__p1, __p2, &__ec);
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool status_known(file_status __s) noexcept {
- return __s.type() != file_type::none;
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool exists(file_status __s) noexcept {
+[[nodiscard]] inline bool status_known(file_status __s) noexcept { return __s.type() != file_type::none; }
+[[nodiscard]] inline bool exists(file_status __s) noexcept {
return status_known(__s) && __s.type() != file_type::not_found;
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool exists(const path& __p) { return exists(__status(__p)); }
+[[nodiscard]] inline bool exists(const path& __p) { return exists(__status(__p)); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool exists(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline bool exists(const path& __p, error_code& __ec) noexcept {
auto __s = __status(__p, &__ec);
if (status_known(__s))
__ec.clear();
return exists(__s);
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI uintmax_t file_size(const path& __p) { return __file_size(__p); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI uintmax_t file_size(const path& __p, error_code& __ec) noexcept {
- return __file_size(__p, &__ec);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count(const path& __p) { return __hard_link_count(__p); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline uintmax_t file_size(const path& __p) { return __file_size(__p); }
+[[nodiscard]] inline uintmax_t file_size(const path& __p, error_code& __ec) noexcept { return __file_size(__p, &__ec); }
+[[nodiscard]] inline uintmax_t hard_link_count(const path& __p) { return __hard_link_count(__p); }
+[[nodiscard]] inline uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept {
return __hard_link_count(__p, &__ec);
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(file_status __s) noexcept {
- return __s.type() == file_type::block;
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(const path& __p) { return is_block_file(__status(__p)); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline bool is_block_file(file_status __s) noexcept { return __s.type() == file_type::block; }
+[[nodiscard]] inline bool is_block_file(const path& __p) { return is_block_file(__status(__p)); }
+[[nodiscard]] inline bool is_block_file(const path& __p, error_code& __ec) noexcept {
return is_block_file(__status(__p, &__ec));
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(file_status __s) noexcept {
- return __s.type() == file_type::character;
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(const path& __p) {
- return is_character_file(__status(__p));
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline bool is_character_file(file_status __s) noexcept { return __s.type() == file_type::character; }
+[[nodiscard]] inline bool is_character_file(const path& __p) { return is_character_file(__status(__p)); }
+[[nodiscard]] inline bool is_character_file(const path& __p, error_code& __ec) noexcept {
return is_character_file(__status(__p, &__ec));
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_directory(file_status __s) noexcept {
- return __s.type() == file_type::directory;
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p) { return is_directory(__status(__p)); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline bool is_directory(file_status __s) noexcept { return __s.type() == file_type::directory; }
+[[nodiscard]] inline bool is_directory(const path& __p) { return is_directory(__status(__p)); }
+[[nodiscard]] inline bool is_directory(const path& __p, error_code& __ec) noexcept {
return is_directory(__status(__p, &__ec));
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p) { return __fs_is_empty(__p); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p, error_code& __ec) {
- return __fs_is_empty(__p, &__ec);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(file_status __s) noexcept {
- return __s.type() == file_type::fifo;
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(const path& __p) { return is_fifo(__status(__p)); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(const path& __p, error_code& __ec) noexcept {
- return is_fifo(__status(__p, &__ec));
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(file_status __s) noexcept {
- return __s.type() == file_type::regular;
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(const path& __p) {
- return is_regular_file(__status(__p));
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline bool is_empty(const path& __p) { return __fs_is_empty(__p); }
+[[nodiscard]] inline bool is_empty(const path& __p, error_code& __ec) { return __fs_is_empty(__p, &__ec); }
+[[nodiscard]] inline bool is_fifo(file_status __s) noexcept { return __s.type() == file_type::fifo; }
+[[nodiscard]] inline bool is_fifo(const path& __p) { return is_fifo(__status(__p)); }
+[[nodiscard]] inline bool is_fifo(const path& __p, error_code& __ec) noexcept { return is_fifo(__status(__p, &__ec)); }
+[[nodiscard]] inline bool is_regular_file(file_status __s) noexcept { return __s.type() == file_type::regular; }
+[[nodiscard]] inline bool is_regular_file(const path& __p) { return is_regular_file(__status(__p)); }
+[[nodiscard]] inline bool is_regular_file(const path& __p, error_code& __ec) noexcept {
return is_regular_file(__status(__p, &__ec));
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(file_status __s) noexcept {
- return __s.type() == file_type::symlink;
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(const path& __p) {
- return is_symlink(__symlink_status(__p));
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline bool is_symlink(file_status __s) noexcept { return __s.type() == file_type::symlink; }
+[[nodiscard]] inline bool is_symlink(const path& __p) { return is_symlink(__symlink_status(__p)); }
+[[nodiscard]] inline bool is_symlink(const path& __p, error_code& __ec) noexcept {
return is_symlink(__symlink_status(__p, &__ec));
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_other(file_status __s) noexcept {
+[[nodiscard]] inline bool is_other(file_status __s) noexcept {
return exists(__s) && !is_regular_file(__s) && !is_directory(__s) && !is_symlink(__s);
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_other(const path& __p) { return is_other(__status(__p)); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_other(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline bool is_other(const path& __p) { return is_other(__status(__p)); }
+[[nodiscard]] inline bool is_other(const path& __p, error_code& __ec) noexcept {
return is_other(__status(__p, &__ec));
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_socket(file_status __s) noexcept {
- return __s.type() == file_type::socket;
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_socket(const path& __p) { return is_socket(__status(__p)); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI bool is_socket(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline bool is_socket(file_status __s) noexcept { return __s.type() == file_type::socket; }
+[[nodiscard]] inline bool is_socket(const path& __p) { return is_socket(__status(__p)); }
+[[nodiscard]] inline bool is_socket(const path& __p, error_code& __ec) noexcept {
return is_socket(__status(__p, &__ec));
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p) {
- return __last_write_time(__p);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline file_time_type last_write_time(const path& __p) { return __last_write_time(__p); }
+[[nodiscard]] inline file_time_type last_write_time(const path& __p, error_code& __ec) noexcept {
return __last_write_time(__p, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t) { __last_write_time(__p, __t); }
-inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t, error_code& __ec) noexcept {
+inline void last_write_time(const path& __p, file_time_type __t) { __last_write_time(__p, __t); }
+inline void last_write_time(const path& __p, file_time_type __t, error_code& __ec) noexcept {
__last_write_time(__p, __t, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI void
-permissions(const path& __p, perms __prms, perm_options __opts = perm_options::replace) {
+inline void permissions(const path& __p, perms __prms, perm_options __opts = perm_options::replace) {
__permissions(__p, __prms, __opts);
}
-inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, error_code& __ec) noexcept {
+inline void permissions(const path& __p, perms __prms, error_code& __ec) noexcept {
__permissions(__p, __prms, perm_options::replace, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts, error_code& __ec) {
+inline void permissions(const path& __p, perms __prms, perm_options __opts, error_code& __ec) {
__permissions(__p, __prms, __opts, &__ec);
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path proximate(const path& __p, const path& __base, error_code& __ec) {
+[[nodiscard]] inline path proximate(const path& __p, const path& __base, error_code& __ec) {
path __tmp = __weakly_canonical(__p, &__ec);
if (__ec)
return {};
@@ -274,18 +215,14 @@ inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, per
return __tmp.lexically_proximate(__tmp_base);
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path proximate(const path& __p, error_code& __ec) {
- return proximate(__p, current_path(), __ec);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path proximate(const path& __p, const path& __base = current_path()) {
+[[nodiscard]] inline path proximate(const path& __p, error_code& __ec) { return proximate(__p, current_path(), __ec); }
+[[nodiscard]] inline path proximate(const path& __p, const path& __base = current_path()) {
return __weakly_canonical(__p).lexically_proximate(__weakly_canonical(__base));
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path read_symlink(const path& __p) { return __read_symlink(__p); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path read_symlink(const path& __p, error_code& __ec) {
- return __read_symlink(__p, &__ec);
-}
+[[nodiscard]] inline path read_symlink(const path& __p) { return __read_symlink(__p); }
+[[nodiscard]] inline path read_symlink(const path& __p, error_code& __ec) { return __read_symlink(__p, &__ec); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path relative(const path& __p, const path& __base, error_code& __ec) {
+[[nodiscard]] inline path relative(const path& __p, const path& __base, error_code& __ec) {
path __tmp = __weakly_canonical(__p, &__ec);
if (__ec)
return path();
@@ -295,46 +232,34 @@ inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, per
return __tmp.lexically_relative(__tmpbase);
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path relative(const path& __p, error_code& __ec) {
- return relative(__p, current_path(), __ec);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path relative(const path& __p, const path& __base = current_path()) {
+[[nodiscard]] inline path relative(const path& __p, error_code& __ec) { return relative(__p, current_path(), __ec); }
+[[nodiscard]] inline path relative(const path& __p, const path& __base = current_path()) {
return __weakly_canonical(__p).lexically_relative(__weakly_canonical(__base));
}
-inline _LIBCPP_HIDE_FROM_ABI uintmax_t remove_all(const path& __p) { return __remove_all(__p); }
-inline _LIBCPP_HIDE_FROM_ABI uintmax_t remove_all(const path& __p, error_code& __ec) {
- return __remove_all(__p, &__ec);
-}
-inline _LIBCPP_HIDE_FROM_ABI bool remove(const path& __p) { return __remove(__p); }
-inline _LIBCPP_HIDE_FROM_ABI bool remove(const path& __p, error_code& __ec) noexcept { return __remove(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to) { return __rename(__from, __to); }
-inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to, error_code& __ec) noexcept {
+inline uintmax_t remove_all(const path& __p) { return __remove_all(__p); }
+inline uintmax_t remove_all(const path& __p, error_code& __ec) { return __remove_all(__p, &__ec); }
+inline bool remove(const path& __p) { return __remove(__p); }
+inline bool remove(const path& __p, error_code& __ec) noexcept { return __remove(__p, &__ec); }
+inline void rename(const path& __from, const path& __to) { return __rename(__from, __to); }
+inline void rename(const path& __from, const path& __to, error_code& __ec) noexcept {
return __rename(__from, __to, &__ec);
}
-inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns) { return __resize_file(__p, __ns); }
-inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns, error_code& __ec) noexcept {
+inline void resize_file(const path& __p, uintmax_t __ns) { return __resize_file(__p, __ns); }
+inline void resize_file(const path& __p, uintmax_t __ns, error_code& __ec) noexcept {
return __resize_file(__p, __ns, &__ec);
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p) { return __space(__p); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p, error_code& __ec) noexcept {
- return __space(__p, &__ec);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI file_status status(const path& __p) { return __status(__p); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI file_status status(const path& __p, error_code& __ec) noexcept {
- return __status(__p, &__ec);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI file_status symlink_status(const path& __p) { return __symlink_status(__p); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI file_status symlink_status(const path& __p, error_code& __ec) noexcept {
+[[nodiscard]] inline space_info space(const path& __p) { return __space(__p); }
+[[nodiscard]] inline space_info space(const path& __p, error_code& __ec) noexcept { return __space(__p, &__ec); }
+[[nodiscard]] inline file_status status(const path& __p) { return __status(__p); }
+[[nodiscard]] inline file_status status(const path& __p, error_code& __ec) noexcept { return __status(__p, &__ec); }
+[[nodiscard]] inline file_status symlink_status(const path& __p) { return __symlink_status(__p); }
+[[nodiscard]] inline file_status symlink_status(const path& __p, error_code& __ec) noexcept {
return __symlink_status(__p, &__ec);
}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path temp_directory_path() { return __temp_directory_path(); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path temp_directory_path(error_code& __ec) {
- return __temp_directory_path(&__ec);
-}
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p) { return __weakly_canonical(__p); }
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p, error_code& __ec) {
- return __weakly_canonical(__p, &__ec);
-}
+[[nodiscard]] inline path temp_directory_path() { return __temp_directory_path(); }
+[[nodiscard]] inline path temp_directory_path(error_code& __ec) { return __temp_directory_path(&__ec); }
+[[nodiscard]] inline path weakly_canonical(path const& __p) { return __weakly_canonical(__p); }
+[[nodiscard]] inline path weakly_canonical(path const& __p, error_code& __ec) { return __weakly_canonical(__p, &__ec); }
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/perm_options.h b/libcxx/include/__filesystem/perm_options.h
index a2ab733eb23dbc..fe4a1a9af09898 100644
--- a/libcxx/include/__filesystem/perm_options.h
+++ b/libcxx/include/__filesystem/perm_options.h
@@ -22,33 +22,27 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
enum class perm_options : unsigned char { replace = 1, add = 2, remove = 4, nofollow = 8 };
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr perm_options operator&(perm_options __lhs, perm_options __rhs) {
+[[nodiscard]] inline constexpr perm_options operator&(perm_options __lhs, perm_options __rhs) {
return static_cast<perm_options>(static_cast<unsigned>(__lhs) & static_cast<unsigned>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr perm_options operator|(perm_options __lhs, perm_options __rhs) {
+[[nodiscard]] inline constexpr perm_options operator|(perm_options __lhs, perm_options __rhs) {
return static_cast<perm_options>(static_cast<unsigned>(__lhs) | static_cast<unsigned>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr perm_options operator^(perm_options __lhs, perm_options __rhs) {
+[[nodiscard]] inline constexpr perm_options operator^(perm_options __lhs, perm_options __rhs) {
return static_cast<perm_options>(static_cast<unsigned>(__lhs) ^ static_cast<unsigned>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr perm_options operator~(perm_options __lhs) {
+[[nodiscard]] inline constexpr perm_options operator~(perm_options __lhs) {
return static_cast<perm_options>(~static_cast<unsigned>(__lhs));
}
-_LIBCPP_HIDE_FROM_ABI inline perm_options& operator&=(perm_options& __lhs, perm_options __rhs) {
- return __lhs = __lhs & __rhs;
-}
+inline perm_options& operator&=(perm_options& __lhs, perm_options __rhs) { return __lhs = __lhs & __rhs; }
-_LIBCPP_HIDE_FROM_ABI inline perm_options& operator|=(perm_options& __lhs, perm_options __rhs) {
- return __lhs = __lhs | __rhs;
-}
+inline perm_options& operator|=(perm_options& __lhs, perm_options __rhs) { return __lhs = __lhs | __rhs; }
-_LIBCPP_HIDE_FROM_ABI inline perm_options& operator^=(perm_options& __lhs, perm_options __rhs) {
- return __lhs = __lhs ^ __rhs;
-}
+inline perm_options& operator^=(perm_options& __lhs, perm_options __rhs) { return __lhs = __lhs ^ __rhs; }
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/perms.h b/libcxx/include/__filesystem/perms.h
index 042f249e123666..66784f3eaeafdb 100644
--- a/libcxx/include/__filesystem/perms.h
+++ b/libcxx/include/__filesystem/perms.h
@@ -51,27 +51,27 @@ enum class perms : unsigned {
unknown = 0xFFFF,
};
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr perms operator&(perms __lhs, perms __rhs) {
+[[nodiscard]] inline constexpr perms operator&(perms __lhs, perms __rhs) {
return static_cast<perms>(static_cast<unsigned>(__lhs) & static_cast<unsigned>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr perms operator|(perms __lhs, perms __rhs) {
+[[nodiscard]] inline constexpr perms operator|(perms __lhs, perms __rhs) {
return static_cast<perms>(static_cast<unsigned>(__lhs) | static_cast<unsigned>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr perms operator^(perms __lhs, perms __rhs) {
+[[nodiscard]] inline constexpr perms operator^(perms __lhs, perms __rhs) {
return static_cast<perms>(static_cast<unsigned>(__lhs) ^ static_cast<unsigned>(__rhs));
}
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr perms operator~(perms __lhs) {
+[[nodiscard]] inline constexpr perms operator~(perms __lhs) {
return static_cast<perms>(~static_cast<unsigned>(__lhs));
}
-_LIBCPP_HIDE_FROM_ABI inline perms& operator&=(perms& __lhs, perms __rhs) { return __lhs = __lhs & __rhs; }
+inline perms& operator&=(perms& __lhs, perms __rhs) { return __lhs = __lhs & __rhs; }
-_LIBCPP_HIDE_FROM_ABI inline perms& operator|=(perms& __lhs, perms __rhs) { return __lhs = __lhs | __rhs; }
+inline perms& operator|=(perms& __lhs, perms __rhs) { return __lhs = __lhs | __rhs; }
-_LIBCPP_HIDE_FROM_ABI inline perms& operator^=(perms& __lhs, perms __rhs) { return __lhs = __lhs ^ __rhs; }
+inline perms& operator^=(perms& __lhs, perms __rhs) { return __lhs = __lhs ^ __rhs; }
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/space_info.h b/libcxx/include/__filesystem/space_info.h
index 28f7ced40d27d6..289c07bba25786 100644
--- a/libcxx/include/__filesystem/space_info.h
+++ b/libcxx/include/__filesystem/space_info.h
@@ -27,7 +27,7 @@ struct space_info {
uintmax_t available;
# if _LIBCPP_STD_VER >= 20
- friend _LIBCPP_HIDE_FROM_ABI bool operator==(const space_info&, const space_info&) = default;
+ friend bool operator==(const space_info&, const space_info&) = default;
# endif
};
diff --git a/libcxx/include/__filesystem/u8path.h b/libcxx/include/__filesystem/u8path.h
index 213e9d5ac1e413..cd7930d50a772f 100644
--- a/libcxx/include/__filesystem/u8path.h
+++ b/libcxx/include/__filesystem/u8path.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
# if !defined(_WIN32) || _LIBCPP_HAS_LOCALIZATION
template <class _InputIt, __enable_if_t<__is_pathable<_InputIt>::value, int> = 0>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(_InputIt __f, _InputIt __l) {
+[[nodiscard]] _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(_InputIt __f, _InputIt __l) {
static_assert(
# if _LIBCPP_HAS_CHAR8_T
is_same<typename __is_pathable<_InputIt>::__char_type, char8_t>::value ||
@@ -49,7 +49,7 @@ template <class _InputIt, __enable_if_t<__is_pathable<_InputIt>::value, int> = 0
# if defined(_WIN32) && _LIBCPP_HAS_LOCALIZATION
template <class _InputIt, __enable_if_t<__is_pathable<_InputIt>::value, int> = 0>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(_InputIt __f, _NullSentinel) {
+[[nodiscard]] _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(_InputIt __f, _NullSentinel) {
static_assert(
# if _LIBCPP_HAS_CHAR8_T
is_same<typename __is_pathable<_InputIt>::__char_type, char8_t>::value ||
@@ -70,7 +70,7 @@ template <class _InputIt, __enable_if_t<__is_pathable<_InputIt>::value, int> = 0
# endif // defined(_WIN32) && _LIBCPP_HAS_LOCALIZATION
template <class _Source, __enable_if_t<__is_pathable<_Source>::value, int> = 0>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(const _Source& __s) {
+[[nodiscard]] _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(const _Source& __s) {
static_assert(
# if _LIBCPP_HAS_CHAR8_T
is_same<typename __is_pathable<_Source>::__char_type, char8_t>::value ||
diff --git a/libcxx/include/__flat_map/flat_map.h b/libcxx/include/__flat_map/flat_map.h
index fb724fa3a16ee8..46878146dfde7c 100644
--- a/libcxx/include/__flat_map/flat_map.h
+++ b/libcxx/include/__flat_map/flat_map.h
@@ -115,12 +115,11 @@ class flat_map {
class value_compare {
private:
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __comp_;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare(key_compare __c) : __comp_(__c) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare(key_compare __c) : __comp_(__c) {}
friend flat_map;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
- operator()(const_reference __x, const_reference __y) const {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator()(const_reference __x, const_reference __y) const {
return __comp_(__x.first, __y.first);
}
};
@@ -132,21 +131,21 @@ class flat_map {
private:
template <class _Allocator>
- _LIBCPP_HIDE_FROM_ABI static constexpr bool __allocator_ctor_constraint =
+ static constexpr bool __allocator_ctor_constraint =
_And<uses_allocator<key_container_type, _Allocator>, uses_allocator<mapped_container_type, _Allocator>>::value;
- _LIBCPP_HIDE_FROM_ABI static constexpr bool __is_compare_transparent = __is_transparent_v<_Compare>;
+ static constexpr bool __is_compare_transparent = __is_transparent_v<_Compare>;
public:
// [flat.map.cons], construct/copy/destroy
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map() noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map() noexcept(
is_nothrow_default_constructible_v<_KeyContainer> && is_nothrow_default_constructible_v<_MappedContainer> &&
is_nothrow_default_constructible_v<_Compare>)
: __containers_(), __compare_() {}
- _LIBCPP_HIDE_FROM_ABI flat_map(const flat_map&) = default;
+ flat_map(const flat_map&) = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(flat_map&& __other) noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(flat_map&& __other) noexcept(
is_nothrow_move_constructible_v<_KeyContainer> && is_nothrow_move_constructible_v<_MappedContainer> &&
is_nothrow_move_constructible_v<_Compare>)
# if _LIBCPP_HAS_EXCEPTIONS
@@ -163,7 +162,7 @@ class flat_map {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(const flat_map& __other, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(const flat_map& __other, const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_tag{},
__alloc,
__other.__containers_.keys,
@@ -172,7 +171,7 @@ class flat_map {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(flat_map&& __other, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(flat_map&& __other, const _Allocator& __alloc)
# if _LIBCPP_HAS_EXCEPTIONS
try
# endif // _LIBCPP_HAS_EXCEPTIONS
@@ -189,7 +188,7 @@ class flat_map {
}
# endif // _LIBCPP_HAS_EXCEPTIONS
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(
key_container_type __key_cont, mapped_container_type __mapped_cont, const key_compare& __comp = key_compare())
: __containers_{.keys = std::move(__key_cont), .values = std::move(__mapped_cont)}, __compare_(__comp) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
@@ -199,7 +198,7 @@ class flat_map {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(const key_container_type& __key_cont, const mapped_container_type& __mapped_cont, const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
@@ -209,7 +208,7 @@ class flat_map {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(const key_container_type& __key_cont,
const mapped_container_type& __mapped_cont,
const key_compare& __comp,
@@ -220,7 +219,7 @@ class flat_map {
__sort_and_unique();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(sorted_unique_t,
key_container_type __key_cont,
mapped_container_type __mapped_cont,
@@ -234,7 +233,7 @@ class flat_map {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(sorted_unique_t,
const key_container_type& __key_cont,
const mapped_container_type& __mapped_cont,
@@ -248,12 +247,12 @@ class flat_map {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(
- sorted_unique_t,
- const key_container_type& __key_cont,
- const mapped_container_type& __mapped_cont,
- const key_compare& __comp,
- const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_map(sorted_unique_t,
+ const key_container_type& __key_cont,
+ const mapped_container_type& __mapped_cont,
+ const key_compare& __comp,
+ const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont, __comp) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
"flat_map keys and mapped containers have different size");
@@ -261,22 +260,21 @@ class flat_map {
__is_sorted_and_unique(__containers_.keys), "Either the key container is not sorted or it contains duplicates");
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_map(const key_compare& __comp)
- : __containers_(), __compare_(__comp) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_map(const key_compare& __comp) : __containers_(), __compare_(__comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(const key_compare& __comp, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(const key_compare& __comp, const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_map(const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_map(const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_empty_tag{}, __alloc) {}
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(_InputIterator __first, _InputIterator __last, const key_compare& __comp = key_compare())
: __containers_(), __compare_(__comp) {
insert(__first, __last);
@@ -284,7 +282,7 @@ class flat_map {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(_InputIterator __first, _InputIterator __last, const key_compare& __comp, const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {
insert(__first, __last);
@@ -292,32 +290,30 @@ class flat_map {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_map(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_empty_tag{}, __alloc) {
insert(__first, __last);
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(from_range_t __fr, _Range&& __rg)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(from_range_t __fr, _Range&& __rg)
: flat_map(__fr, std::forward<_Range>(__rg), key_compare()) {}
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(from_range_t, _Range&& __rg, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(from_range_t, _Range&& __rg, const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_empty_tag{}, __alloc) {
insert_range(std::forward<_Range>(__rg));
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(from_range_t, _Range&& __rg, const key_compare& __comp)
- : flat_map(__comp) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(from_range_t, _Range&& __rg, const key_compare& __comp) : flat_map(__comp) {
insert_range(std::forward<_Range>(__rg));
}
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(from_range_t, _Range&& __rg, const key_compare& __comp, const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {
insert_range(std::forward<_Range>(__rg));
@@ -325,72 +321,70 @@ class flat_map {
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(sorted_unique_t, _InputIterator __first, _InputIterator __last, const key_compare& __comp = key_compare())
: __containers_(), __compare_(__comp) {
insert(sorted_unique, __first, __last);
}
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(
- sorted_unique_t,
- _InputIterator __first,
- _InputIterator __last,
- const key_compare& __comp,
- const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_map(sorted_unique_t,
+ _InputIterator __first,
+ _InputIterator __last,
+ const key_compare& __comp,
+ const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {
insert(sorted_unique, __first, __last);
}
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(sorted_unique_t, _InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
: flat_map(__ctor_uses_allocator_empty_tag{}, __alloc) {
insert(sorted_unique, __first, __last);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: flat_map(__il.begin(), __il.end(), __comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(initializer_list<value_type> __il, const key_compare& __comp, const _Allocator& __alloc)
: flat_map(__il.begin(), __il.end(), __comp, __alloc) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_map(initializer_list<value_type> __il, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(initializer_list<value_type> __il, const _Allocator& __alloc)
: flat_map(__il.begin(), __il.end(), __alloc) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(sorted_unique_t, initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: flat_map(sorted_unique, __il.begin(), __il.end(), __comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(sorted_unique_t, initializer_list<value_type> __il, const key_compare& __comp, const _Allocator& __alloc)
: flat_map(sorted_unique, __il.begin(), __il.end(), __comp, __alloc) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_map(sorted_unique_t, initializer_list<value_type> __il, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(sorted_unique_t, initializer_list<value_type> __il, const _Allocator& __alloc)
: flat_map(sorted_unique, __il.begin(), __il.end(), __alloc) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map& operator=(initializer_list<value_type> __il) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map& operator=(initializer_list<value_type> __il) {
clear();
insert(__il);
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map& operator=(const flat_map&) = default;
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map& operator=(const flat_map&) = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map& operator=(flat_map&& __other) noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map& operator=(flat_map&& __other) noexcept(
is_nothrow_move_assignable_v<_KeyContainer> && is_nothrow_move_assignable_v<_MappedContainer> &&
is_nothrow_move_assignable_v<_Compare>) {
// No matter what happens, we always want to clear the other container before returning
@@ -407,69 +401,57 @@ class flat_map {
}
// iterators
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
return iterator(__containers_.keys.begin(), __containers_.values.begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
return const_iterator(__containers_.keys.begin(), __containers_.values.begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept {
return iterator(__containers_.keys.end(), __containers_.values.end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
return const_iterator(__containers_.keys.end(), __containers_.values.end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept {
- return reverse_iterator(end());
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
return const_reverse_iterator(end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept {
- return reverse_iterator(begin());
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
return const_reverse_iterator(begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept {
- return begin();
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept {
- return end();
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept { return begin(); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept { return end(); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
return const_reverse_iterator(end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
return const_reverse_iterator(begin());
}
// [flat.map.capacity], capacity
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept {
- return __containers_.keys.empty();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept { return __containers_.keys.empty(); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept {
- return __containers_.keys.size();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept { return __containers_.keys.size(); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept {
return std::min<size_type>(__containers_.keys.max_size(), __containers_.values.max_size());
}
// [flat.map.access], element access
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 mapped_type& operator[](const key_type& __x)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 mapped_type& operator[](const key_type& __x)
requires is_constructible_v<mapped_type>
{
return try_emplace(__x).first->second;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 mapped_type& operator[](key_type&& __x)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 mapped_type& operator[](key_type&& __x)
requires is_constructible_v<mapped_type>
{
return try_emplace(std::move(__x)).first->second;
@@ -478,11 +460,11 @@ class flat_map {
template <class _Kp>
requires(__is_compare_transparent && is_constructible_v<key_type, _Kp> && is_constructible_v<mapped_type> &&
!is_convertible_v<_Kp &&, const_iterator> && !is_convertible_v<_Kp &&, iterator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 mapped_type& operator[](_Kp&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 mapped_type& operator[](_Kp&& __x) {
return try_emplace(std::forward<_Kp>(__x)).first->second;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 mapped_type& at(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 mapped_type& at(const key_type& __x) {
auto __it = find(__x);
if (__it == end()) {
std::__throw_out_of_range("flat_map::at(const key_type&): Key does not exist");
@@ -490,7 +472,7 @@ class flat_map {
return __it->second;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const mapped_type& at(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const mapped_type& at(const key_type& __x) const {
auto __it = find(__x);
if (__it == end()) {
std::__throw_out_of_range("flat_map::at(const key_type&) const: Key does not exist");
@@ -500,7 +482,7 @@ class flat_map {
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 mapped_type& at(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 mapped_type& at(const _Kp& __x) {
auto __it = find(__x);
if (__it == end()) {
std::__throw_out_of_range("flat_map::at(const K&): Key does not exist");
@@ -510,7 +492,7 @@ class flat_map {
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const mapped_type& at(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const mapped_type& at(const _Kp& __x) const {
auto __it = find(__x);
if (__it == end()) {
std::__throw_out_of_range("flat_map::at(const K&) const: Key does not exist");
@@ -521,49 +503,45 @@ class flat_map {
// [flat.map.modifiers], modifiers
template <class... _Args>
requires is_constructible_v<pair<key_type, mapped_type>, _Args...>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> emplace(_Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> emplace(_Args&&... __args) {
std::pair<key_type, mapped_type> __pair(std::forward<_Args>(__args)...);
return __try_emplace(std::move(__pair.first), std::move(__pair.second));
}
template <class... _Args>
requires is_constructible_v<pair<key_type, mapped_type>, _Args...>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace_hint(const_iterator __hint, _Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace_hint(const_iterator __hint, _Args&&... __args) {
std::pair<key_type, mapped_type> __pair(std::forward<_Args>(__args)...);
return __try_emplace_hint(__hint, std::move(__pair.first), std::move(__pair.second)).first;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(const value_type& __x) {
- return emplace(__x);
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(const value_type& __x) { return emplace(__x); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(value_type&& __x) {
- return emplace(std::move(__x));
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(value_type&& __x) { return emplace(std::move(__x)); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, const value_type& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, const value_type& __x) {
return emplace_hint(__hint, __x);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, value_type&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, value_type&& __x) {
return emplace_hint(__hint, std::move(__x));
}
template <class _PairLike>
requires is_constructible_v<pair<key_type, mapped_type>, _PairLike>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(_PairLike&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(_PairLike&& __x) {
return emplace(std::forward<_PairLike>(__x));
}
template <class _PairLike>
requires is_constructible_v<pair<key_type, mapped_type>, _PairLike>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, _PairLike&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, _PairLike&& __x) {
return emplace_hint(__hint, std::forward<_PairLike>(__x));
}
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(_InputIterator __first, _InputIterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(_InputIterator __first, _InputIterator __last) {
if constexpr (sized_sentinel_for<_InputIterator, _InputIterator>) {
__reserve(__last - __first);
}
@@ -572,8 +550,7 @@ class flat_map {
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- insert(sorted_unique_t, _InputIterator __first, _InputIterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_unique_t, _InputIterator __first, _InputIterator __last) {
if constexpr (sized_sentinel_for<_InputIterator, _InputIterator>) {
__reserve(__last - __first);
}
@@ -582,7 +559,7 @@ class flat_map {
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(_Range&& __range) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(_Range&& __range) {
if constexpr (ranges::sized_range<_Range>) {
__reserve(ranges::size(__range));
}
@@ -591,7 +568,7 @@ class flat_map {
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(sorted_unique_t, _Range&& __range) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(sorted_unique_t, _Range&& __range) {
if constexpr (ranges::sized_range<_Range>) {
__reserve(ranges::size(__range));
}
@@ -599,22 +576,19 @@ class flat_map {
__append_sort_merge_unique</*WasSorted = */ true>(ranges::begin(__range), ranges::end(__range));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) {
- insert(__il.begin(), __il.end());
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) { insert(__il.begin(), __il.end()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_unique_t, initializer_list<value_type> __il) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_unique_t, initializer_list<value_type> __il) {
insert(sorted_unique, __il.begin(), __il.end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 containers extract() && {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 containers extract() && {
auto __guard = std::__make_scope_guard([&]() noexcept { clear() /* noexcept */; });
auto __ret = std::move(__containers_);
return __ret;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- replace(key_container_type&& __key_cont, mapped_container_type&& __mapped_cont) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void replace(key_container_type&& __key_cont, mapped_container_type&& __mapped_cont) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(
__key_cont.size() == __mapped_cont.size(), "flat_map keys and mapped containers have different size");
@@ -628,15 +602,13 @@ class flat_map {
template <class... _Args>
requires is_constructible_v<mapped_type, _Args...>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool>
- try_emplace(const key_type& __key, _Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> try_emplace(const key_type& __key, _Args&&... __args) {
return __try_emplace(__key, std::forward<_Args>(__args)...);
}
template <class... _Args>
requires is_constructible_v<mapped_type, _Args...>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool>
- try_emplace(key_type&& __key, _Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> try_emplace(key_type&& __key, _Args&&... __args) {
return __try_emplace(std::move(__key), std::forward<_Args>(__args)...);
}
@@ -644,84 +616,76 @@ class flat_map {
requires(__is_compare_transparent && is_constructible_v<key_type, _Kp> &&
is_constructible_v<mapped_type, _Args...> && !is_convertible_v<_Kp &&, const_iterator> &&
!is_convertible_v<_Kp &&, iterator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> try_emplace(_Kp&& __key, _Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> try_emplace(_Kp&& __key, _Args&&... __args) {
return __try_emplace(std::forward<_Kp>(__key), std::forward<_Args>(__args)...);
}
template <class... _Args>
requires is_constructible_v<mapped_type, _Args...>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator
- try_emplace(const_iterator __hint, const key_type& __key, _Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator try_emplace(const_iterator __hint, const key_type& __key, _Args&&... __args) {
return __try_emplace_hint(__hint, __key, std::forward<_Args>(__args)...).first;
}
template <class... _Args>
requires is_constructible_v<mapped_type, _Args...>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator
- try_emplace(const_iterator __hint, key_type&& __key, _Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator try_emplace(const_iterator __hint, key_type&& __key, _Args&&... __args) {
return __try_emplace_hint(__hint, std::move(__key), std::forward<_Args>(__args)...).first;
}
template <class _Kp, class... _Args>
requires __is_compare_transparent && is_constructible_v<key_type, _Kp> && is_constructible_v<mapped_type, _Args...>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator
- try_emplace(const_iterator __hint, _Kp&& __key, _Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator try_emplace(const_iterator __hint, _Kp&& __key, _Args&&... __args) {
return __try_emplace_hint(__hint, std::forward<_Kp>(__key), std::forward<_Args>(__args)...).first;
}
template <class _Mapped>
requires is_assignable_v<mapped_type&, _Mapped> && is_constructible_v<mapped_type, _Mapped>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool>
- insert_or_assign(const key_type& __key, _Mapped&& __obj) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert_or_assign(const key_type& __key, _Mapped&& __obj) {
return __insert_or_assign(__key, std::forward<_Mapped>(__obj));
}
template <class _Mapped>
requires is_assignable_v<mapped_type&, _Mapped> && is_constructible_v<mapped_type, _Mapped>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool>
- insert_or_assign(key_type&& __key, _Mapped&& __obj) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert_or_assign(key_type&& __key, _Mapped&& __obj) {
return __insert_or_assign(std::move(__key), std::forward<_Mapped>(__obj));
}
template <class _Kp, class _Mapped>
requires __is_compare_transparent && is_constructible_v<key_type, _Kp> && is_assignable_v<mapped_type&, _Mapped> &&
is_constructible_v<mapped_type, _Mapped>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool>
- insert_or_assign(_Kp&& __key, _Mapped&& __obj) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert_or_assign(_Kp&& __key, _Mapped&& __obj) {
return __insert_or_assign(std::forward<_Kp>(__key), std::forward<_Mapped>(__obj));
}
template <class _Mapped>
requires is_assignable_v<mapped_type&, _Mapped> && is_constructible_v<mapped_type, _Mapped>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator
insert_or_assign(const_iterator __hint, const key_type& __key, _Mapped&& __obj) {
return __insert_or_assign(__hint, __key, std::forward<_Mapped>(__obj));
}
template <class _Mapped>
requires is_assignable_v<mapped_type&, _Mapped> && is_constructible_v<mapped_type, _Mapped>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator
- insert_or_assign(const_iterator __hint, key_type&& __key, _Mapped&& __obj) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert_or_assign(const_iterator __hint, key_type&& __key, _Mapped&& __obj) {
return __insert_or_assign(__hint, std::move(__key), std::forward<_Mapped>(__obj));
}
template <class _Kp, class _Mapped>
requires __is_compare_transparent && is_constructible_v<key_type, _Kp> && is_assignable_v<mapped_type&, _Mapped> &&
is_constructible_v<mapped_type, _Mapped>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator
- insert_or_assign(const_iterator __hint, _Kp&& __key, _Mapped&& __obj) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert_or_assign(const_iterator __hint, _Kp&& __key, _Mapped&& __obj) {
return __insert_or_assign(__hint, std::forward<_Kp>(__key), std::forward<_Mapped>(__obj));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(iterator __position) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(iterator __position) {
return __erase(__position.__key_iter_, __position.__mapped_iter_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __position) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __position) {
return __erase(__position.__key_iter_, __position.__mapped_iter_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(const key_type& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(const key_type& __x) {
auto __iter = find(__x);
if (__iter != end()) {
erase(__iter);
@@ -733,14 +697,14 @@ class flat_map {
template <class _Kp>
requires(__is_compare_transparent && !is_convertible_v<_Kp &&, iterator> &&
!is_convertible_v<_Kp &&, const_iterator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(_Kp&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(_Kp&& __x) {
auto [__first, __last] = equal_range(__x);
auto __res = __last - __first;
erase(__first, __last);
return __res;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __first, const_iterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __first, const_iterator __last) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
auto __key_it = __containers_.keys.erase(__first.__key_iter_, __last.__key_iter_);
auto __mapped_it = __containers_.values.erase(__first.__mapped_iter_, __last.__mapped_iter_);
@@ -748,7 +712,7 @@ class flat_map {
return iterator(std::move(__key_it), std::move(__mapped_it));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void
swap(flat_map& __y) noexcept(is_nothrow_swappable_v<key_container_type> &&
is_nothrow_swappable_v<mapped_container_type> && is_nothrow_swappable_v<key_compare>) {
auto __on_failure = std::__make_exception_guard([&]() noexcept {
@@ -761,177 +725,163 @@ class flat_map {
__on_failure.__complete();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void clear() noexcept {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void clear() noexcept {
__containers_.keys.clear();
__containers_.values.clear();
}
// observers
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 key_compare key_comp() const { return __compare_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare value_comp() const {
- return value_compare(__compare_);
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 key_compare key_comp() const { return __compare_; }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare value_comp() const { return value_compare(__compare_); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const key_container_type& keys() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const key_container_type& keys() const noexcept {
return __containers_.keys;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const mapped_container_type&
- values() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const mapped_container_type& values() const noexcept {
return __containers_.values;
}
// map operations
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) {
- return __find_impl(*this, __x);
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) { return __find_impl(*this, __x); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const {
return __find_impl(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const _Kp& __x) {
return __find_impl(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const _Kp& __x) const {
return __find_impl(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const key_type& __x) const {
return contains(__x) ? 1 : 0;
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const _Kp& __x) const {
return contains(__x) ? 1 : 0;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const {
- return find(__x) != end();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const { return find(__x) != end(); }
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const _Kp& __x) const {
return find(__x) != end();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const key_type& __x) {
return __lower_bound<iterator>(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator
- lower_bound(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const key_type& __x) const {
return __lower_bound<const_iterator>(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const _Kp& __x) {
return __lower_bound<iterator>(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const _Kp& __x) const {
return __lower_bound<const_iterator>(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const key_type& __x) {
return __upper_bound<iterator>(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator
- upper_bound(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const key_type& __x) const {
return __upper_bound<const_iterator>(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const _Kp& __x) {
return __upper_bound<iterator>(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const _Kp& __x) const {
return __upper_bound<const_iterator>(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator>
- equal_range(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator> equal_range(const key_type& __x) {
return __equal_range_impl(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
equal_range(const key_type& __x) const {
return __equal_range_impl(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator>
- equal_range(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator> equal_range(const _Kp& __x) {
return __equal_range_impl(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
- equal_range(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator> equal_range(const _Kp& __x) const {
return __equal_range_impl(*this, __x);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator==(const flat_map& __x, const flat_map& __y) {
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator==(const flat_map& __x, const flat_map& __y) {
return ranges::equal(__x, __y);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 auto
- operator<=>(const flat_map& __x, const flat_map& __y) {
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 auto operator<=>(const flat_map& __x, const flat_map& __y) {
return std::lexicographical_compare_three_way(
__x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- swap(flat_map& __x, flat_map& __y) noexcept(noexcept(__x.swap(__y))) {
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 void swap(flat_map& __x, flat_map& __y) noexcept(noexcept(__x.swap(__y))) {
__x.swap(__y);
}
private:
struct __ctor_uses_allocator_tag {
- explicit _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __ctor_uses_allocator_tag() = default;
+ explicit _LIBCPP_CONSTEXPR_SINCE_CXX26 __ctor_uses_allocator_tag() = default;
};
struct __ctor_uses_allocator_empty_tag {
- explicit _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __ctor_uses_allocator_empty_tag() = default;
+ explicit _LIBCPP_CONSTEXPR_SINCE_CXX26 __ctor_uses_allocator_empty_tag() = default;
};
template <class _Allocator, class _KeyCont, class _MappedCont, class... _CompArg>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_map(
- __ctor_uses_allocator_tag,
- const _Allocator& __alloc,
- _KeyCont&& __key_cont,
- _MappedCont&& __mapped_cont,
- _CompArg&&... __comp)
- : __containers_{.keys = std::make_obj_using_allocator<key_container_type>(
- __alloc, std::forward<_KeyCont>(__key_cont)),
- .values = std::make_obj_using_allocator<mapped_container_type>(
- __alloc, std::forward<_MappedCont>(__mapped_cont))},
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_map(__ctor_uses_allocator_tag,
+ const _Allocator& __alloc,
+ _KeyCont&& __key_cont,
+ _MappedCont&& __mapped_cont,
+ _CompArg&&... __comp)
+ : __containers_{
+ .keys = std::make_obj_using_allocator<key_container_type>(__alloc, std::forward<_KeyCont>(__key_cont)),
+ .values = std::make_obj_using_allocator<mapped_container_type>(
+ __alloc, std::forward<_MappedCont>(__mapped_cont))},
__compare_(std::forward<_CompArg>(__comp)...) {}
template <class _Allocator, class... _CompArg>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_map(__ctor_uses_allocator_empty_tag, const _Allocator& __alloc, _CompArg&&... __comp)
: __containers_{.keys = std::make_obj_using_allocator<key_container_type>(__alloc),
.values = std::make_obj_using_allocator<mapped_container_type>(__alloc)},
__compare_(std::forward<_CompArg>(__comp)...) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __is_sorted_and_unique(auto&& __key_container) const {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __is_sorted_and_unique(auto&& __key_container) const {
auto __greater_or_equal_to = [this](const auto& __x, const auto& __y) -> bool { return !__compare_(__x, __y); };
return ranges::adjacent_find(__key_container, __greater_or_equal_to) == ranges::end(__key_container);
}
@@ -939,7 +889,7 @@ class flat_map {
// This function is only used in constructors. So there is not exception handling in this function.
// If the function exits via an exception, there will be no flat_map object constructed, thus, there
// is no invariant state to preserve
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __sort_and_unique() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __sort_and_unique() {
auto __zv = ranges::views::zip(__containers_.keys, __containers_.values);
ranges::sort(__zv, __compare_, [](const auto& __p) -> decltype(auto) { return std::get<0>(__p); });
auto __dup_start = ranges::unique(__zv, __key_equiv(__compare_)).begin();
@@ -949,16 +899,14 @@ class flat_map {
}
template <class _Self, class _KeyIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto
- __corresponding_mapped_it(_Self&& __self, _KeyIter&& __key_iter) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __corresponding_mapped_it(_Self&& __self, _KeyIter&& __key_iter) {
return __self.__containers_.values.begin() +
static_cast<ranges::range_difference_t<mapped_container_type>>(
ranges::distance(__self.__containers_.keys.begin(), __key_iter));
}
template <bool _WasSorted, class _InputIterator, class _Sentinel>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- __append_sort_merge_unique(_InputIterator __first, _Sentinel __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __append_sort_merge_unique(_InputIterator __first, _Sentinel __last) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
size_t __num_of_appended = __flat_map_utils::__append(*this, std::move(__first), std::move(__last));
if (__num_of_appended != 0) {
@@ -986,7 +934,7 @@ class flat_map {
}
template <class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __find_impl(_Self&& __self, const _Kp& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __find_impl(_Self&& __self, const _Kp& __key) {
auto __it = __self.lower_bound(__key);
auto __last = __self.end();
if (__it == __last || __self.__compare_(__key, __it->first)) {
@@ -996,7 +944,7 @@ class flat_map {
}
template <class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __key_equal_range(_Self&& __self, const _Kp& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __key_equal_range(_Self&& __self, const _Kp& __key) {
auto __it =
std::lower_bound(__self.__containers_.keys.begin(), __self.__containers_.keys.end(), __key, __self.__compare_);
auto __last = __self.__containers_.keys.end();
@@ -1007,7 +955,7 @@ class flat_map {
}
template <class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __equal_range_impl(_Self&& __self, const _Kp& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __equal_range_impl(_Self&& __self, const _Kp& __key) {
auto [__key_first, __key_last] = __key_equal_range(__self, __key);
using __iterator_type = ranges::iterator_t<decltype(__self)>;
return std::make_pair(__iterator_type(__key_first, __corresponding_mapped_it(__self, __key_first)),
@@ -1015,7 +963,7 @@ class flat_map {
}
template <class _Res, class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static _Res __lower_bound(_Self&& __self, _Kp& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static _Res __lower_bound(_Self&& __self, _Kp& __x) {
auto __key_iter =
std::lower_bound(__self.__containers_.keys.begin(), __self.__containers_.keys.end(), __x, __self.__compare_);
auto __mapped_iter = __corresponding_mapped_it(__self, __key_iter);
@@ -1023,7 +971,7 @@ class flat_map {
}
template <class _Res, class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static _Res __upper_bound(_Self&& __self, _Kp& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static _Res __upper_bound(_Self&& __self, _Kp& __x) {
auto __key_iter =
std::upper_bound(__self.__containers_.keys.begin(), __self.__containers_.keys.end(), __x, __self.__compare_);
auto __mapped_iter = __corresponding_mapped_it(__self, __key_iter);
@@ -1031,8 +979,7 @@ class flat_map {
}
template <class _KeyArg, class... _MArgs>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool>
- __try_emplace(_KeyArg&& __key, _MArgs&&... __mapped_args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> __try_emplace(_KeyArg&& __key, _MArgs&&... __mapped_args) {
auto __key_it = std::lower_bound(__containers_.keys.begin(), __containers_.keys.end(), __key, __compare_);
auto __mapped_it = __containers_.values.begin() + ranges::distance(__containers_.keys.begin(), __key_it);
@@ -1051,7 +998,7 @@ class flat_map {
}
template <class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __is_hint_correct(const_iterator __hint, _Kp&& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __is_hint_correct(const_iterator __hint, _Kp&& __key) {
if (__hint != cbegin() && !__compare_((__hint - 1)->first, __key)) {
return false;
}
@@ -1062,7 +1009,7 @@ class flat_map {
}
template <class _Kp, class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool>
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool>
__try_emplace_hint(const_iterator __hint, _Kp&& __key, _Args&&... __args) {
if (__is_hint_correct(__hint, __key)) {
if (__hint == cend() || __compare_(__key, __hint->first)) {
@@ -1084,8 +1031,7 @@ class flat_map {
}
template <class _Kp, class _Mapped>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool>
- __insert_or_assign(_Kp&& __key, _Mapped&& __mapped) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> __insert_or_assign(_Kp&& __key, _Mapped&& __mapped) {
auto __r = try_emplace(std::forward<_Kp>(__key), std::forward<_Mapped>(__mapped));
if (!__r.second) {
__r.first->second = std::forward<_Mapped>(__mapped);
@@ -1094,8 +1040,7 @@ class flat_map {
}
template <class _Kp, class _Mapped>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator
- __insert_or_assign(const_iterator __hint, _Kp&& __key, _Mapped&& __mapped) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator __insert_or_assign(const_iterator __hint, _Kp&& __key, _Mapped&& __mapped) {
auto __r = __try_emplace_hint(__hint, std::forward<_Kp>(__key), std::forward<_Mapped>(__mapped));
if (!__r.second) {
__r.first->second = std::forward<_Mapped>(__mapped);
@@ -1103,7 +1048,7 @@ class flat_map {
return __r.first;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __reserve(size_t __size) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __reserve(size_t __size) {
if constexpr (__container_traits<_KeyContainer>::__reservable) {
__containers_.keys.reserve(__size);
}
@@ -1114,8 +1059,7 @@ class flat_map {
}
template <class _KIter, class _MIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator
- __erase(_KIter __key_iter_to_remove, _MIter __mapped_iter_to_remove) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator __erase(_KIter __key_iter_to_remove, _MIter __mapped_iter_to_remove) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
auto __key_iter = __containers_.keys.erase(__key_iter_to_remove);
auto __mapped_iter = __containers_.values.erase(__mapped_iter_to_remove);
@@ -1134,9 +1078,8 @@ class flat_map {
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __compare_;
struct __key_equiv {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_equiv(key_compare __c) : __comp_(__c) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
- operator()(const_reference __x, const_reference __y) const {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_equiv(key_compare __c) : __comp_(__c) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator()(const_reference __x, const_reference __y) const {
return !__comp_(std::get<0>(__x), std::get<0>(__y)) && !__comp_(std::get<0>(__y), std::get<0>(__x));
}
key_compare __comp_;
@@ -1255,9 +1198,8 @@ struct uses_allocator<flat_map<_Key, _Tp, _Compare, _KeyContainer, _MappedContai
: bool_constant<uses_allocator_v<_KeyContainer, _Allocator> && uses_allocator_v<_MappedContainer, _Allocator>> {};
template <class _Key, class _Tp, class _Compare, class _KeyContainer, class _MappedContainer, class _Predicate>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- typename flat_map<_Key, _Tp, _Compare, _KeyContainer, _MappedContainer>::size_type
- erase_if(flat_map<_Key, _Tp, _Compare, _KeyContainer, _MappedContainer>& __flat_map, _Predicate __pred) {
+_LIBCPP_CONSTEXPR_SINCE_CXX26 typename flat_map<_Key, _Tp, _Compare, _KeyContainer, _MappedContainer>::size_type
+erase_if(flat_map<_Key, _Tp, _Compare, _KeyContainer, _MappedContainer>& __flat_map, _Predicate __pred) {
auto __zv = ranges::views::zip(__flat_map.__containers_.keys, __flat_map.__containers_.values);
auto __first = __zv.begin();
auto __last = __zv.end();
diff --git a/libcxx/include/__flat_map/flat_multimap.h b/libcxx/include/__flat_map/flat_multimap.h
index 677560660a6de9..7bd4a66bdf7236 100644
--- a/libcxx/include/__flat_map/flat_multimap.h
+++ b/libcxx/include/__flat_map/flat_multimap.h
@@ -112,12 +112,11 @@ class flat_multimap {
class value_compare {
private:
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __comp_;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare(key_compare __c) : __comp_(__c) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare(key_compare __c) : __comp_(__c) {}
friend flat_multimap;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
- operator()(const_reference __x, const_reference __y) const {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator()(const_reference __x, const_reference __y) const {
return __comp_(__x.first, __y.first);
}
};
@@ -129,24 +128,24 @@ class flat_multimap {
private:
template <class _Allocator>
- _LIBCPP_HIDE_FROM_ABI static constexpr bool __allocator_ctor_constraint =
+ static constexpr bool __allocator_ctor_constraint =
_And<uses_allocator<key_container_type, _Allocator>, uses_allocator<mapped_container_type, _Allocator>>::value;
- _LIBCPP_HIDE_FROM_ABI static constexpr bool __is_compare_transparent = __is_transparent_v<_Compare>;
+ static constexpr bool __is_compare_transparent = __is_transparent_v<_Compare>;
public:
// [flat.map.cons], construct/copy/destroy
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap() noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap() noexcept(
is_nothrow_default_constructible_v<_KeyContainer> && is_nothrow_default_constructible_v<_MappedContainer> &&
is_nothrow_default_constructible_v<_Compare>)
: __containers_(), __compare_() {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(const flat_multimap&) = default;
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(const flat_multimap&) = default;
// The copy/move constructors are not specified in the spec, which means they should be defaulted.
// However, the move constructor can potentially leave a moved-from object in an inconsistent
// state if an exception is thrown.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(flat_multimap&& __other) noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(flat_multimap&& __other) noexcept(
is_nothrow_move_constructible_v<_KeyContainer> && is_nothrow_move_constructible_v<_MappedContainer> &&
is_nothrow_move_constructible_v<_Compare>)
# if _LIBCPP_HAS_EXCEPTIONS
@@ -163,8 +162,7 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multimap(const flat_multimap& __other, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(const flat_multimap& __other, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_tag{},
__alloc,
__other.__containers_.keys,
@@ -173,7 +171,7 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(flat_multimap&& __other, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(flat_multimap&& __other, const _Allocator& __alloc)
# if _LIBCPP_HAS_EXCEPTIONS
try
# endif // _LIBCPP_HAS_EXCEPTIONS
@@ -190,7 +188,7 @@ class flat_multimap {
}
# endif // _LIBCPP_HAS_EXCEPTIONS
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
key_container_type __key_cont, mapped_container_type __mapped_cont, const key_compare& __comp = key_compare())
: __containers_{.keys = std::move(__key_cont), .values = std::move(__mapped_cont)}, __compare_(__comp) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
@@ -200,7 +198,7 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
const key_container_type& __key_cont, const mapped_container_type& __mapped_cont, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
@@ -210,22 +208,22 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
- const key_container_type& __key_cont,
- const mapped_container_type& __mapped_cont,
- const key_compare& __comp,
- const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(const key_container_type& __key_cont,
+ const mapped_container_type& __mapped_cont,
+ const key_compare& __comp,
+ const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont, __comp) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
"flat_multimap keys and mapped containers have different size");
__sort();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
- sorted_equivalent_t,
- key_container_type __key_cont,
- mapped_container_type __mapped_cont,
- const key_compare& __comp = key_compare())
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(sorted_equivalent_t,
+ key_container_type __key_cont,
+ mapped_container_type __mapped_cont,
+ const key_compare& __comp = key_compare())
: __containers_{.keys = std::move(__key_cont), .values = std::move(__mapped_cont)}, __compare_(__comp) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
"flat_multimap keys and mapped containers have different size");
@@ -234,11 +232,11 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
- sorted_equivalent_t,
- const key_container_type& __key_cont,
- const mapped_container_type& __mapped_cont,
- const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(sorted_equivalent_t,
+ const key_container_type& __key_cont,
+ const mapped_container_type& __mapped_cont,
+ const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
"flat_multimap keys and mapped containers have different size");
@@ -247,35 +245,34 @@ class flat_multimap {
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
- sorted_equivalent_t,
- const key_container_type& __key_cont,
- const mapped_container_type& __mapped_cont,
- const key_compare& __comp,
- const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(sorted_equivalent_t,
+ const key_container_type& __key_cont,
+ const mapped_container_type& __mapped_cont,
+ const key_compare& __comp,
+ const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_tag{}, __alloc, __key_cont, __mapped_cont, __comp) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__containers_.keys.size() == __containers_.values.size(),
"flat_multimap keys and mapped containers have different size");
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(__is_sorted(__containers_.keys), "Key container is not sorted");
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multimap(const key_compare& __comp)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multimap(const key_compare& __comp)
: __containers_(), __compare_(__comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multimap(const key_compare& __comp, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(const key_compare& __comp, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multimap(const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multimap(const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc) {}
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(_InputIterator __first, _InputIterator __last, const key_compare& __comp = key_compare())
: __containers_(), __compare_(__comp) {
insert(__first, __last);
@@ -283,7 +280,7 @@ class flat_multimap {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(_InputIterator __first, _InputIterator __last, const key_compare& __comp, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {
insert(__first, __last);
@@ -291,34 +288,31 @@ class flat_multimap {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multimap(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc) {
insert(__first, __last);
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(from_range_t __fr, _Range&& __rg)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(from_range_t __fr, _Range&& __rg)
: flat_multimap(__fr, std::forward<_Range>(__rg), key_compare()) {}
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multimap(from_range_t, _Range&& __rg, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(from_range_t, _Range&& __rg, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc) {
insert_range(std::forward<_Range>(__rg));
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multimap(from_range_t, _Range&& __rg, const key_compare& __comp)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(from_range_t, _Range&& __rg, const key_compare& __comp)
: flat_multimap(__comp) {
insert_range(std::forward<_Range>(__rg));
}
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(from_range_t, _Range&& __rg, const key_compare& __comp, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {
insert_range(std::forward<_Range>(__rg));
@@ -326,64 +320,63 @@ class flat_multimap {
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
sorted_equivalent_t, _InputIterator __first, _InputIterator __last, const key_compare& __comp = key_compare())
: __containers_(), __compare_(__comp) {
insert(sorted_equivalent, __first, __last);
}
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
- sorted_equivalent_t,
- _InputIterator __first,
- _InputIterator __last,
- const key_compare& __comp,
- const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(sorted_equivalent_t,
+ _InputIterator __first,
+ _InputIterator __last,
+ const key_compare& __comp,
+ const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc, __comp) {
insert(sorted_equivalent, __first, __last);
}
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && __allocator_ctor_constraint<_Allocator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(sorted_equivalent_t, _InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
: flat_multimap(__ctor_uses_allocator_empty_tag{}, __alloc) {
insert(sorted_equivalent, __first, __last);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: flat_multimap(__il.begin(), __il.end(), __comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(initializer_list<value_type> __il, const key_compare& __comp, const _Allocator& __alloc)
: flat_multimap(__il.begin(), __il.end(), __comp, __alloc) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multimap(initializer_list<value_type> __il, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(initializer_list<value_type> __il, const _Allocator& __alloc)
: flat_multimap(__il.begin(), __il.end(), __alloc) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(sorted_equivalent_t, initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: flat_multimap(sorted_equivalent, __il.begin(), __il.end(), __comp) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
sorted_equivalent_t, initializer_list<value_type> __il, const key_compare& __comp, const _Allocator& __alloc)
: flat_multimap(sorted_equivalent, __il.begin(), __il.end(), __comp, __alloc) {}
template <class _Allocator>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(sorted_equivalent_t, initializer_list<value_type> __il, const _Allocator& __alloc)
: flat_multimap(sorted_equivalent, __il.begin(), __il.end(), __alloc) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap& operator=(initializer_list<value_type> __il) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap& operator=(initializer_list<value_type> __il) {
clear();
insert(__il);
return *this;
@@ -392,9 +385,9 @@ class flat_multimap {
// copy/move assignment are not specified in the spec (defaulted)
// but move assignment can potentially leave moved from object in an inconsistent
// state if an exception is thrown
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap& operator=(const flat_multimap&) = default;
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap& operator=(const flat_multimap&) = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap& operator=(flat_multimap&& __other) noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap& operator=(flat_multimap&& __other) noexcept(
is_nothrow_move_assignable_v<_KeyContainer> && is_nothrow_move_assignable_v<_MappedContainer> &&
is_nothrow_move_assignable_v<_Compare>) {
auto __clear_other_guard = std::__make_scope_guard([&]() noexcept { __other.clear() /* noexcept */; });
@@ -406,58 +399,46 @@ class flat_multimap {
}
// iterators
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
return iterator(__containers_.keys.begin(), __containers_.values.begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
return const_iterator(__containers_.keys.begin(), __containers_.values.begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept {
return iterator(__containers_.keys.end(), __containers_.values.end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
return const_iterator(__containers_.keys.end(), __containers_.values.end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept {
- return reverse_iterator(end());
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
return const_reverse_iterator(end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept {
- return reverse_iterator(begin());
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
return const_reverse_iterator(begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept {
- return begin();
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept {
- return end();
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept { return begin(); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept { return end(); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
return const_reverse_iterator(end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
return const_reverse_iterator(begin());
}
// [flat.map.capacity], capacity
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept {
- return __containers_.keys.empty();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept { return __containers_.keys.empty(); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept {
- return __containers_.keys.size();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept { return __containers_.keys.size(); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept {
return std::min<size_type>(__containers_.keys.max_size(), __containers_.values.max_size());
}
@@ -465,7 +446,7 @@ class flat_multimap {
template <class... _Args>
requires is_constructible_v<pair<key_type, mapped_type>, _Args...> && is_move_constructible_v<key_type> &&
is_move_constructible_v<mapped_type>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace(_Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace(_Args&&... __args) {
std::pair<key_type, mapped_type> __pair(std::forward<_Args>(__args)...);
auto __key_it = std::upper_bound(__containers_.keys.begin(), __containers_.keys.end(), __pair.first, __compare_);
auto __mapped_it = __corresponding_mapped_it(*this, __key_it);
@@ -476,7 +457,7 @@ class flat_multimap {
template <class... _Args>
requires is_constructible_v<pair<key_type, mapped_type>, _Args...>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace_hint(const_iterator __hint, _Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace_hint(const_iterator __hint, _Args&&... __args) {
std::pair<key_type, mapped_type> __pair(std::forward<_Args>(__args)...);
auto __prev_larger = __hint != cbegin() && __compare_(__pair.first, (__hint - 1)->first);
@@ -516,35 +497,33 @@ class flat_multimap {
*this, __key_iter, __mapped_iter, std::move(__pair.first), std::move(__pair.second));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const value_type& __x) { return emplace(__x); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const value_type& __x) { return emplace(__x); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(value_type&& __x) {
- return emplace(std::move(__x));
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(value_type&& __x) { return emplace(std::move(__x)); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, const value_type& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, const value_type& __x) {
return emplace_hint(__hint, __x);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, value_type&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, value_type&& __x) {
return emplace_hint(__hint, std::move(__x));
}
template <class _PairLike>
requires is_constructible_v<pair<key_type, mapped_type>, _PairLike>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(_PairLike&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(_PairLike&& __x) {
return emplace(std::forward<_PairLike>(__x));
}
template <class _PairLike>
requires is_constructible_v<pair<key_type, mapped_type>, _PairLike>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, _PairLike&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, _PairLike&& __x) {
return emplace_hint(__hint, std::forward<_PairLike>(__x));
}
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(_InputIterator __first, _InputIterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(_InputIterator __first, _InputIterator __last) {
if constexpr (sized_sentinel_for<_InputIterator, _InputIterator>) {
__reserve(__last - __first);
}
@@ -553,8 +532,7 @@ class flat_multimap {
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- insert(sorted_equivalent_t, _InputIterator __first, _InputIterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_equivalent_t, _InputIterator __first, _InputIterator __last) {
if constexpr (sized_sentinel_for<_InputIterator, _InputIterator>) {
__reserve(__last - __first);
}
@@ -563,7 +541,7 @@ class flat_multimap {
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(_Range&& __range) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(_Range&& __range) {
if constexpr (ranges::sized_range<_Range>) {
__reserve(ranges::size(__range));
}
@@ -572,7 +550,7 @@ class flat_multimap {
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(sorted_equivalent_t, _Range&& __range) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(sorted_equivalent_t, _Range&& __range) {
if constexpr (ranges::sized_range<_Range>) {
__reserve(ranges::size(__range));
}
@@ -580,23 +558,19 @@ class flat_multimap {
__append_sort_merge</*WasSorted = */ true>(ranges::begin(__range), ranges::end(__range));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) {
- insert(__il.begin(), __il.end());
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) { insert(__il.begin(), __il.end()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- insert(sorted_equivalent_t, initializer_list<value_type> __il) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_equivalent_t, initializer_list<value_type> __il) {
insert(sorted_equivalent, __il.begin(), __il.end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 containers extract() && {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 containers extract() && {
auto __guard = std::__make_scope_guard([&]() noexcept { clear() /* noexcept */; });
auto __ret = std::move(__containers_);
return __ret;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- replace(key_container_type&& __key_cont, mapped_container_type&& __mapped_cont) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void replace(key_container_type&& __key_cont, mapped_container_type&& __mapped_cont) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(
__key_cont.size() == __mapped_cont.size(), "flat_multimap keys and mapped containers have different size");
@@ -607,15 +581,15 @@ class flat_multimap {
__guard.__complete();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(iterator __position) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(iterator __position) {
return __erase(__position.__key_iter_, __position.__mapped_iter_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __position) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __position) {
return __erase(__position.__key_iter_, __position.__mapped_iter_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(const key_type& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(const key_type& __x) {
auto [__first, __last] = equal_range(__x);
auto __res = __last - __first;
erase(__first, __last);
@@ -625,14 +599,14 @@ class flat_multimap {
template <class _Kp>
requires(__is_compare_transparent && !is_convertible_v<_Kp &&, iterator> &&
!is_convertible_v<_Kp &&, const_iterator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(_Kp&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(_Kp&& __x) {
auto [__first, __last] = equal_range(__x);
auto __res = __last - __first;
erase(__first, __last);
return __res;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __first, const_iterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __first, const_iterator __last) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
auto __key_it = __containers_.keys.erase(__first.__key_iter_, __last.__key_iter_);
auto __mapped_it = __containers_.values.erase(__first.__mapped_iter_, __last.__mapped_iter_);
@@ -640,7 +614,7 @@ class flat_multimap {
return iterator(std::move(__key_it), std::move(__mapped_it));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void swap(flat_multimap& __y) noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void swap(flat_multimap& __y) noexcept(
is_nothrow_swappable_v<key_container_type> && is_nothrow_swappable_v<mapped_container_type> &&
is_nothrow_swappable_v<key_compare>) {
auto __on_failure = std::__make_exception_guard([&]() noexcept {
@@ -653,199 +627,183 @@ class flat_multimap {
__on_failure.__complete();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void clear() noexcept {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void clear() noexcept {
__containers_.keys.clear();
__containers_.values.clear();
}
// observers
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 key_compare key_comp() const { return __compare_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare value_comp() const {
- return value_compare(__compare_);
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 key_compare key_comp() const { return __compare_; }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare value_comp() const { return value_compare(__compare_); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const key_container_type& keys() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const key_container_type& keys() const noexcept {
return __containers_.keys;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const mapped_container_type&
- values() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const mapped_container_type& values() const noexcept {
return __containers_.values;
}
// map operations
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) {
- return __find_impl(*this, __x);
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) { return __find_impl(*this, __x); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const {
return __find_impl(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const _Kp& __x) {
return __find_impl(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const _Kp& __x) const {
return __find_impl(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const key_type& __x) const {
auto [__first, __last] = equal_range(__x);
return __last - __first;
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const _Kp& __x) const {
auto [__first, __last] = equal_range(__x);
return __last - __first;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const {
- return find(__x) != end();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const { return find(__x) != end(); }
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const _Kp& __x) const {
return find(__x) != end();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const key_type& __x) {
return __lower_bound<iterator>(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator
- lower_bound(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const key_type& __x) const {
return __lower_bound<const_iterator>(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const _Kp& __x) {
return __lower_bound<iterator>(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const _Kp& __x) const {
return __lower_bound<const_iterator>(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const key_type& __x) {
return __upper_bound<iterator>(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator
- upper_bound(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const key_type& __x) const {
return __upper_bound<const_iterator>(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const _Kp& __x) {
return __upper_bound<iterator>(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const _Kp& __x) const {
return __upper_bound<const_iterator>(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator>
- equal_range(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator> equal_range(const key_type& __x) {
return __equal_range_impl(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
equal_range(const key_type& __x) const {
return __equal_range_impl(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator>
- equal_range(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator> equal_range(const _Kp& __x) {
return __equal_range_impl(*this, __x);
}
template <class _Kp>
requires __is_compare_transparent
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
- equal_range(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator> equal_range(const _Kp& __x) const {
return __equal_range_impl(*this, __x);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
- operator==(const flat_multimap& __x, const flat_multimap& __y) {
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator==(const flat_multimap& __x, const flat_multimap& __y) {
return ranges::equal(__x, __y);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 auto
- operator<=>(const flat_multimap& __x, const flat_multimap& __y) {
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 auto operator<=>(const flat_multimap& __x, const flat_multimap& __y) {
return std::lexicographical_compare_three_way(
__x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 void
swap(flat_multimap& __x, flat_multimap& __y) noexcept(noexcept(__x.swap(__y))) {
__x.swap(__y);
}
private:
struct __ctor_uses_allocator_tag {
- explicit _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __ctor_uses_allocator_tag() = default;
+ explicit _LIBCPP_CONSTEXPR_SINCE_CXX26 __ctor_uses_allocator_tag() = default;
};
struct __ctor_uses_allocator_empty_tag {
- explicit _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __ctor_uses_allocator_empty_tag() = default;
+ explicit _LIBCPP_CONSTEXPR_SINCE_CXX26 __ctor_uses_allocator_empty_tag() = default;
};
template <class _Allocator, class _KeyCont, class _MappedCont, class... _CompArg>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multimap(
- __ctor_uses_allocator_tag,
- const _Allocator& __alloc,
- _KeyCont&& __key_cont,
- _MappedCont&& __mapped_cont,
- _CompArg&&... __comp)
- : __containers_{.keys = std::make_obj_using_allocator<key_container_type>(
- __alloc, std::forward<_KeyCont>(__key_cont)),
- .values = std::make_obj_using_allocator<mapped_container_type>(
- __alloc, std::forward<_MappedCont>(__mapped_cont))},
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multimap(__ctor_uses_allocator_tag,
+ const _Allocator& __alloc,
+ _KeyCont&& __key_cont,
+ _MappedCont&& __mapped_cont,
+ _CompArg&&... __comp)
+ : __containers_{
+ .keys = std::make_obj_using_allocator<key_container_type>(__alloc, std::forward<_KeyCont>(__key_cont)),
+ .values = std::make_obj_using_allocator<mapped_container_type>(
+ __alloc, std::forward<_MappedCont>(__mapped_cont))},
__compare_(std::forward<_CompArg>(__comp)...) {}
template <class _Allocator, class... _CompArg>
requires __allocator_ctor_constraint<_Allocator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multimap(__ctor_uses_allocator_empty_tag, const _Allocator& __alloc, _CompArg&&... __comp)
: __containers_{.keys = std::make_obj_using_allocator<key_container_type>(__alloc),
.values = std::make_obj_using_allocator<mapped_container_type>(__alloc)},
__compare_(std::forward<_CompArg>(__comp)...) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __is_sorted(auto&& __key_container) const {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __is_sorted(auto&& __key_container) const {
return ranges::is_sorted(__key_container, __compare_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __sort() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __sort() {
auto __zv = ranges::views::zip(__containers_.keys, __containers_.values);
ranges::sort(__zv, __compare_, [](const auto& __p) -> decltype(auto) { return std::get<0>(__p); });
}
template <class _Self, class _KeyIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto
- __corresponding_mapped_it(_Self&& __self, _KeyIter&& __key_iter) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __corresponding_mapped_it(_Self&& __self, _KeyIter&& __key_iter) {
return __self.__containers_.values.begin() +
static_cast<ranges::range_difference_t<mapped_container_type>>(
ranges::distance(__self.__containers_.keys.begin(), __key_iter));
}
template <bool _WasSorted, class _InputIterator, class _Sentinel>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- __append_sort_merge(_InputIterator __first, _Sentinel __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __append_sort_merge(_InputIterator __first, _Sentinel __last) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
size_t __num_appended = __flat_map_utils::__append(*this, std::move(__first), std::move(__last));
if (__num_appended != 0) {
@@ -868,7 +826,7 @@ class flat_multimap {
}
template <class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __find_impl(_Self&& __self, const _Kp& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __find_impl(_Self&& __self, const _Kp& __key) {
auto __it = __self.lower_bound(__key);
auto __last = __self.end();
if (__it == __last || __self.__compare_(__key, __it->first)) {
@@ -878,7 +836,7 @@ class flat_multimap {
}
template <class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __equal_range_impl(_Self&& __self, const _Kp& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __equal_range_impl(_Self&& __self, const _Kp& __key) {
auto [__key_first, __key_last] =
std::equal_range(__self.__containers_.keys.begin(), __self.__containers_.keys.end(), __key, __self.__compare_);
@@ -888,7 +846,7 @@ class flat_multimap {
}
template <class _Res, class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static _Res __lower_bound(_Self&& __self, _Kp& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static _Res __lower_bound(_Self&& __self, _Kp& __x) {
auto __key_iter =
std::lower_bound(__self.__containers_.keys.begin(), __self.__containers_.keys.end(), __x, __self.__compare_);
auto __mapped_iter = __corresponding_mapped_it(__self, __key_iter);
@@ -896,14 +854,14 @@ class flat_multimap {
}
template <class _Res, class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static _Res __upper_bound(_Self&& __self, _Kp& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static _Res __upper_bound(_Self&& __self, _Kp& __x) {
auto __key_iter =
std::upper_bound(__self.__containers_.keys.begin(), __self.__containers_.keys.end(), __x, __self.__compare_);
auto __mapped_iter = __corresponding_mapped_it(__self, __key_iter);
return _Res(std::move(__key_iter), std::move(__mapped_iter));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __reserve(size_t __size) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __reserve(size_t __size) {
if constexpr (__container_traits<_KeyContainer>::__reservable) {
__containers_.keys.reserve(__size);
}
@@ -914,8 +872,7 @@ class flat_multimap {
}
template <class _KIter, class _MIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator
- __erase(_KIter __key_iter_to_remove, _MIter __mapped_iter_to_remove) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator __erase(_KIter __key_iter_to_remove, _MIter __mapped_iter_to_remove) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
auto __key_iter = __containers_.keys.erase(__key_iter_to_remove);
auto __mapped_iter = __containers_.values.erase(__mapped_iter_to_remove);
@@ -1047,9 +1004,8 @@ struct uses_allocator<flat_multimap<_Key, _Tp, _Compare, _KeyContainer, _MappedC
: bool_constant<uses_allocator_v<_KeyContainer, _Allocator> && uses_allocator_v<_MappedContainer, _Allocator>> {};
template <class _Key, class _Tp, class _Compare, class _KeyContainer, class _MappedContainer, class _Predicate>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- typename flat_multimap<_Key, _Tp, _Compare, _KeyContainer, _MappedContainer>::size_type
- erase_if(flat_multimap<_Key, _Tp, _Compare, _KeyContainer, _MappedContainer>& __flat_multimap, _Predicate __pred) {
+_LIBCPP_CONSTEXPR_SINCE_CXX26 typename flat_multimap<_Key, _Tp, _Compare, _KeyContainer, _MappedContainer>::size_type
+erase_if(flat_multimap<_Key, _Tp, _Compare, _KeyContainer, _MappedContainer>& __flat_multimap, _Predicate __pred) {
auto __zv = ranges::views::zip(__flat_multimap.__containers_.keys, __flat_multimap.__containers_.values);
auto __first = __zv.begin();
auto __last = __zv.end();
diff --git a/libcxx/include/__flat_map/key_value_iterator.h b/libcxx/include/__flat_map/key_value_iterator.h
index 795651a07937be..b4da2bfd50895e 100644
--- a/libcxx/include/__flat_map/key_value_iterator.h
+++ b/libcxx/include/__flat_map/key_value_iterator.h
@@ -48,7 +48,7 @@ struct __key_value_iterator {
struct __arrow_proxy {
__reference __ref_;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __reference* operator->() { return std::addressof(__ref_); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __reference* operator->() { return std::addressof(__ref_); }
};
__key_iterator __key_iter_;
@@ -71,115 +71,111 @@ struct __key_value_iterator {
using value_type = typename _Owner::value_type;
using difference_type = typename _Owner::difference_type;
- _LIBCPP_HIDE_FROM_ABI __key_value_iterator() = default;
+ __key_value_iterator() = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
__key_value_iterator(__key_value_iterator<_Owner, _KeyContainer, _MappedContainer, !_Const> __i)
requires _Const && convertible_to<typename _KeyContainer::iterator, __key_iterator> &&
convertible_to<typename _MappedContainer::iterator, __mapped_iterator>
: __key_iter_(std::move(__i.__key_iter_)), __mapped_iter_(std::move(__i.__mapped_iter_)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
__key_value_iterator(__key_iterator __key_iter, __mapped_iterator __mapped_iter)
: __key_iter_(std::move(__key_iter)), __mapped_iter_(std::move(__mapped_iter)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __reference operator*() const {
- return __reference(*__key_iter_, *__mapped_iter_);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __arrow_proxy operator->() const { return __arrow_proxy{**this}; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __reference operator*() const { return __reference(*__key_iter_, *__mapped_iter_); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __arrow_proxy operator->() const { return __arrow_proxy{**this}; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator& operator++() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator& operator++() {
++__key_iter_;
++__mapped_iter_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator operator++(int) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator operator++(int) {
__key_value_iterator __tmp(*this);
++*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator& operator--() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator& operator--() {
--__key_iter_;
--__mapped_iter_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator operator--(int) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator operator--(int) {
__key_value_iterator __tmp(*this);
--*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator& operator+=(difference_type __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator& operator+=(difference_type __x) {
__key_iter_ += __x;
__mapped_iter_ += __x;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator& operator-=(difference_type __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_value_iterator& operator-=(difference_type __x) {
__key_iter_ -= __x;
__mapped_iter_ -= __x;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __reference operator[](difference_type __n) const {
- return *(*this + __n);
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __reference operator[](difference_type __n) const { return *(*this + __n); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 friend bool
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 friend bool
operator==(const __key_value_iterator& __x, const __key_value_iterator& __y) {
return __x.__key_iter_ == __y.__key_iter_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 friend bool
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 friend bool
operator<(const __key_value_iterator& __x, const __key_value_iterator& __y) {
return __x.__key_iter_ < __y.__key_iter_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 friend bool
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 friend bool
operator>(const __key_value_iterator& __x, const __key_value_iterator& __y) {
return __y < __x;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 friend bool
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 friend bool
operator<=(const __key_value_iterator& __x, const __key_value_iterator& __y) {
return !(__y < __x);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 friend bool
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 friend bool
operator>=(const __key_value_iterator& __x, const __key_value_iterator& __y) {
return !(__x < __y);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 friend auto
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 friend auto
operator<=>(const __key_value_iterator& __x, const __key_value_iterator& __y)
requires three_way_comparable<__key_iterator>
{
return __x.__key_iter_ <=> __y.__key_iter_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 friend __key_value_iterator
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 friend __key_value_iterator
operator+(const __key_value_iterator& __i, difference_type __n) {
auto __tmp = __i;
__tmp += __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 friend __key_value_iterator
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 friend __key_value_iterator
operator+(difference_type __n, const __key_value_iterator& __i) {
return __i + __n;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 friend __key_value_iterator
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 friend __key_value_iterator
operator-(const __key_value_iterator& __i, difference_type __n) {
auto __tmp = __i;
__tmp -= __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 friend difference_type
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 friend difference_type
operator-(const __key_value_iterator& __x, const __key_value_iterator& __y) {
return difference_type(__x.__key_iter_ - __y.__key_iter_);
}
@@ -190,7 +186,7 @@ struct __product_iterator_traits<__key_value_iterator<_Owner, _KeyContainer, _Ma
static constexpr size_t __size = 2;
template <size_t _Nth, class _Iter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static decltype(auto) __get_iterator_element(_Iter&& __it)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static decltype(auto) __get_iterator_element(_Iter&& __it)
requires(_Nth <= 1)
{
if constexpr (_Nth == 0) {
@@ -201,7 +197,7 @@ struct __product_iterator_traits<__key_value_iterator<_Owner, _KeyContainer, _Ma
}
template <class _KeyIter, class _MappedIter>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto
__make_product_iterator(_KeyIter&& __key_iter, _MappedIter&& __mapped_iter) {
return __key_value_iterator<_Owner, _KeyContainer, _MappedContainer, _Const>(
std::forward<_KeyIter>(__key_iter), std::forward<_MappedIter>(__mapped_iter));
diff --git a/libcxx/include/__flat_map/utils.h b/libcxx/include/__flat_map/utils.h
index 4b07e388d02559..bf2f2cbaf7a80a 100644
--- a/libcxx/include/__flat_map/utils.h
+++ b/libcxx/include/__flat_map/utils.h
@@ -37,7 +37,7 @@ struct __flat_map_utils {
// roll back the changes it made to the map. If it cannot roll back the changes, it will
// clear the map.
template <class _Map, class _IterK, class _IterM, class _KeyArg, class... _MArgs>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static typename _Map::iterator __emplace_exact_pos(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static typename _Map::iterator __emplace_exact_pos(
_Map& __map, _IterK&& __it_key, _IterM&& __it_mapped, _KeyArg&& __key, _MArgs&&... __mapped_args) {
auto __on_key_failed = std::__make_exception_guard([&]() noexcept {
using _KeyContainer = typename _Map::key_container_type;
@@ -82,7 +82,7 @@ struct __flat_map_utils {
}
template <class _Map, class _InputIterator, class _Sentinel>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static typename _Map::size_type
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static typename _Map::size_type
__append(_Map& __map, _InputIterator __first, _Sentinel __last) {
typename _Map::size_type __num_appended = 0;
for (; __first != __last; ++__first) {
@@ -95,7 +95,7 @@ struct __flat_map_utils {
}
template <class _Map, class _InputIterator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static typename _Map::size_type
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static typename _Map::size_type
__append(_Map& __map, _InputIterator __first, _InputIterator __last)
requires __is_product_iterator_of_size<_InputIterator, 2>::value
{
diff --git a/libcxx/include/__flat_set/flat_multiset.h b/libcxx/include/__flat_set/flat_multiset.h
index d549f7ab78f1bb..b282e7fa226b90 100644
--- a/libcxx/include/__flat_set/flat_multiset.h
+++ b/libcxx/include/__flat_set/flat_multiset.h
@@ -96,16 +96,16 @@ class flat_multiset {
public:
// [flat.multiset.cons], constructors
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset() noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset() noexcept(
is_nothrow_default_constructible_v<_KeyContainer> && is_nothrow_default_constructible_v<_Compare>)
: __keys_(), __compare_() {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const flat_multiset&) = default;
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const flat_multiset&) = default;
// The copy/move constructors are not specified in the spec, which means they should be defaulted.
// However, the move constructor can potentially leave a moved-from object in an inconsistent
// state if an exception is thrown.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(flat_multiset&& __other) noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(flat_multiset&& __other) noexcept(
is_nothrow_move_constructible_v<_KeyContainer> && is_nothrow_move_constructible_v<_Compare>)
# if _LIBCPP_HAS_EXCEPTIONS
try
@@ -119,16 +119,14 @@ class flat_multiset {
}
# endif // _LIBCPP_HAS_EXCEPTIONS
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(const key_compare& __comp)
- : __keys_(), __compare_(__comp) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(const key_compare& __comp) : __keys_(), __compare_(__comp) {}
- _LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(container_type __keys, const key_compare& __comp = key_compare())
: __keys_(std::move(__keys)), __compare_(__comp) {
ranges::sort(__keys_, __compare_);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(sorted_equivalent_t, container_type __keys, const key_compare& __comp = key_compare())
: __keys_(std::move(__keys)), __compare_(__comp) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys_, __compare_), "Key container is not sorted");
@@ -136,7 +134,7 @@ class flat_multiset {
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(_InputIterator __first, _InputIterator __last, const key_compare& __comp = key_compare())
: __keys_(), __compare_(__comp) {
insert(__first, __last);
@@ -144,53 +142,50 @@ class flat_multiset {
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(
sorted_equivalent_t, _InputIterator __first, _InputIterator __last, const key_compare& __comp = key_compare())
: __keys_(__first, __last), __compare_(__comp) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys_, __compare_), "Key container is not sorted");
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(from_range_t __fr, _Range&& __rg)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(from_range_t __fr, _Range&& __rg)
: flat_multiset(__fr, std::forward<_Range>(__rg), key_compare()) {}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp)
: flat_multiset(__comp) {
insert_range(std::forward<_Range>(__rg));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: flat_multiset(__il.begin(), __il.end(), __comp) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(sorted_equivalent_t, initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: flat_multiset(sorted_equivalent, __il.begin(), __il.end(), __comp) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_multiset(const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_() {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multiset(const key_compare& __comp, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const key_compare& __comp, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_(__comp) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multiset(const container_type& __keys, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const container_type& __keys, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_() {
ranges::sort(__keys_, __compare_);
}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(const container_type& __keys, const key_compare& __comp, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_(__comp) {
ranges::sort(__keys_, __compare_);
@@ -198,7 +193,7 @@ class flat_multiset {
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(sorted_equivalent_t, const container_type& __keys, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_() {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys_, __compare_), "Key container is not sorted");
@@ -206,7 +201,7 @@ class flat_multiset {
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(sorted_equivalent_t, const container_type& __keys, const key_compare& __comp, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_(__comp) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys_, __compare_), "Key container is not sorted");
@@ -214,14 +209,13 @@ class flat_multiset {
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multiset(const flat_multiset& __other, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(const flat_multiset& __other, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __other.__keys_)),
__compare_(__other.__compare_) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(flat_multiset&& __other, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(flat_multiset&& __other, const _Allocator& __alloc)
# if _LIBCPP_HAS_EXCEPTIONS
try
# endif // _LIBCPP_HAS_EXCEPTIONS
@@ -237,15 +231,14 @@ class flat_multiset {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multiset(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_() {
insert(__first, __last);
}
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(_InputIterator __first, _InputIterator __last, const key_compare& __comp, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_(__comp) {
insert(__first, __last);
@@ -253,7 +246,7 @@ class flat_multiset {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(sorted_equivalent_t, _InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __first, __last)), __compare_() {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys_, __compare_), "Key container is not sorted");
@@ -261,27 +254,26 @@ class flat_multiset {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(
- sorted_equivalent_t,
- _InputIterator __first,
- _InputIterator __last,
- const key_compare& __comp,
- const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_multiset(sorted_equivalent_t,
+ _InputIterator __first,
+ _InputIterator __last,
+ const key_compare& __comp,
+ const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __first, __last)), __compare_(__comp) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys_, __compare_), "Key container is not sorted");
}
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multiset(from_range_t, _Range&& __rg, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(from_range_t, _Range&& __rg, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_() {
insert_range(std::forward<_Range>(__rg));
}
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(from_range_t, _Range&& __rg, const key_compare& __comp, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_(__comp) {
insert_range(std::forward<_Range>(__rg));
@@ -289,29 +281,28 @@ class flat_multiset {
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_multiset(initializer_list<value_type> __il, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(initializer_list<value_type> __il, const _Allocator& __alloc)
: flat_multiset(__il.begin(), __il.end(), __alloc) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(initializer_list<value_type> __il, const key_compare& __comp, const _Allocator& __alloc)
: flat_multiset(__il.begin(), __il.end(), __comp, __alloc) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_multiset(sorted_equivalent_t, initializer_list<value_type> __il, const _Allocator& __alloc)
: flat_multiset(sorted_equivalent, __il.begin(), __il.end(), __alloc) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset(
sorted_equivalent_t, initializer_list<value_type> __il, const key_compare& __comp, const _Allocator& __alloc)
: flat_multiset(sorted_equivalent, __il.begin(), __il.end(), __comp, __alloc) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset& operator=(initializer_list<value_type> __il) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset& operator=(initializer_list<value_type> __il) {
clear();
insert(__il);
return *this;
@@ -320,9 +311,9 @@ class flat_multiset {
// copy/move assignment are not specified in the spec (defaulted)
// but move assignment can potentially leave moved from object in an inconsistent
// state if an exception is thrown
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset& operator=(const flat_multiset&) = default;
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset& operator=(const flat_multiset&) = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset& operator=(flat_multiset&& __other) noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_multiset& operator=(flat_multiset&& __other) noexcept(
is_nothrow_move_assignable_v<_KeyContainer> && is_nothrow_move_assignable_v<_Compare>) {
auto __clear_other_guard = std::__make_scope_guard([&]() noexcept { __other.clear() /* noexcept */; });
auto __clear_self_guard = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
@@ -333,60 +324,44 @@ class flat_multiset {
}
// iterators
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
return iterator(std::as_const(__keys_).begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
return const_iterator(__keys_.begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept {
- return iterator(std::as_const(__keys_).end());
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept { return iterator(std::as_const(__keys_).end()); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
return const_iterator(__keys_.end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept {
- return reverse_iterator(end());
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
return const_reverse_iterator(end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept {
- return reverse_iterator(begin());
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
return const_reverse_iterator(begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept {
- return begin();
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept {
- return end();
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept { return begin(); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept { return end(); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
return const_reverse_iterator(end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
return const_reverse_iterator(begin());
}
// capacity
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept {
- return __keys_.empty();
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept {
- return __keys_.size();
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept {
- return __keys_.max_size();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept { return __keys_.empty(); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept { return __keys_.size(); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept { return __keys_.max_size(); }
// [flat.multiset.modifiers], modifiers
template <class... _Args>
requires is_constructible_v<value_type, _Args...>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace(_Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace(_Args&&... __args) {
if constexpr (sizeof...(__args) == 1 && (is_same_v<remove_cvref_t<_Args>, _Key> && ...)) {
return __emplace(std::forward<_Args>(__args)...);
} else {
@@ -396,7 +371,7 @@ class flat_multiset {
template <class... _Args>
requires is_constructible_v<value_type, _Args...>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace_hint(const_iterator __hint, _Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace_hint(const_iterator __hint, _Args&&... __args) {
if constexpr (sizeof...(__args) == 1 && (is_same_v<remove_cvref_t<_Args>, _Key> && ...)) {
return __emplace_hint(std::move(__hint), std::forward<_Args>(__args)...);
} else {
@@ -404,23 +379,21 @@ class flat_multiset {
}
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const value_type& __x) { return emplace(__x); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const value_type& __x) { return emplace(__x); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(value_type&& __x) {
- return emplace(std::move(__x));
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(value_type&& __x) { return emplace(std::move(__x)); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, const value_type& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, const value_type& __x) {
return emplace_hint(__hint, __x);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, value_type&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, value_type&& __x) {
return emplace_hint(__hint, std::move(__x));
}
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(_InputIterator __first, _InputIterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(_InputIterator __first, _InputIterator __last) {
if constexpr (sized_sentinel_for<_InputIterator, _InputIterator>) {
__reserve(__last - __first);
}
@@ -429,8 +402,7 @@ class flat_multiset {
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- insert(sorted_equivalent_t, _InputIterator __first, _InputIterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_equivalent_t, _InputIterator __first, _InputIterator __last) {
if constexpr (sized_sentinel_for<_InputIterator, _InputIterator>) {
__reserve(__last - __first);
}
@@ -439,7 +411,7 @@ class flat_multiset {
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(_Range&& __range) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(_Range&& __range) {
if constexpr (ranges::sized_range<_Range>) {
__reserve(ranges::size(__range));
}
@@ -448,7 +420,7 @@ class flat_multiset {
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(sorted_equivalent_t, _Range&& __range) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(sorted_equivalent_t, _Range&& __range) {
if constexpr (ranges::sized_range<_Range>) {
__reserve(ranges::size(__range));
}
@@ -456,29 +428,26 @@ class flat_multiset {
__append_sort_merge</*WasSorted = */ true>(std::forward<_Range>(__range));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) {
- insert(__il.begin(), __il.end());
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) { insert(__il.begin(), __il.end()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- insert(sorted_equivalent_t, initializer_list<value_type> __il) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_equivalent_t, initializer_list<value_type> __il) {
insert(sorted_equivalent, __il.begin(), __il.end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 container_type extract() && {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 container_type extract() && {
auto __guard = std::__make_scope_guard([&]() noexcept { clear() /* noexcept */; });
auto __ret = std::move(__keys_);
return __ret;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void replace(container_type&& __keys) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void replace(container_type&& __keys) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(ranges::is_sorted(__keys, __compare_), "Key container is not sorted");
auto __guard = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
__keys_ = std::move(__keys);
__guard.__complete();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(iterator __position) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(iterator __position) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
auto __key_iter = __keys_.erase(__position.__base());
__on_failure.__complete();
@@ -488,7 +457,7 @@ class flat_multiset {
// The following overload is the same as the iterator overload
// iterator erase(const_iterator __position);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(const key_type& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(const key_type& __x) {
auto [__first, __last] = equal_range(__x);
auto __res = __last - __first;
erase(__first, __last);
@@ -498,21 +467,21 @@ class flat_multiset {
template <class _Kp>
requires(__is_transparent_v<_Compare> && !is_convertible_v<_Kp &&, iterator> &&
!is_convertible_v<_Kp &&, const_iterator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(_Kp&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(_Kp&& __x) {
auto [__first, __last] = equal_range(__x);
auto __res = __last - __first;
erase(__first, __last);
return __res;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __first, const_iterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __first, const_iterator __last) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
auto __key_it = __keys_.erase(__first.__base(), __last.__base());
__on_failure.__complete();
return iterator(std::move(__key_it));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void
swap(flat_multiset& __y) noexcept(is_nothrow_swappable_v<container_type> && is_nothrow_swappable_v<key_compare>) {
auto __on_failure = std::__make_exception_guard([&]() noexcept {
clear() /* noexcept */;
@@ -523,145 +492,132 @@ class flat_multiset {
__on_failure.__complete();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void clear() noexcept { __keys_.clear(); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void clear() noexcept { __keys_.clear(); }
// observers
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 key_compare key_comp() const { return __compare_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare value_comp() const {
- return __compare_;
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 key_compare key_comp() const { return __compare_; }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare value_comp() const { return __compare_; }
// map operations
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) {
- return __find_impl(*this, __x);
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) { return __find_impl(*this, __x); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const {
return __find_impl(*this, __x);
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const _Kp& __x) {
return __find_impl(*this, __x);
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const _Kp& __x) const {
return __find_impl(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const key_type& __x) const {
auto [__first, __last] = equal_range(__x);
return __last - __first;
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const _Kp& __x) const {
auto [__first, __last] = equal_range(__x);
return __last - __first;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const {
- return find(__x) != end();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const { return find(__x) != end(); }
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const _Kp& __x) const {
return find(__x) != end();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const key_type& __x) {
const auto& __keys = __keys_;
return iterator(std::lower_bound(__keys.begin(), __keys.end(), __x, __compare_));
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator
- lower_bound(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const key_type& __x) const {
return const_iterator(std::lower_bound(__keys_.begin(), __keys_.end(), __x, __compare_));
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const _Kp& __x) {
const auto& __keys = __keys_;
return iterator(std::lower_bound(__keys.begin(), __keys.end(), __x, __compare_));
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const _Kp& __x) const {
return const_iterator(std::lower_bound(__keys_.begin(), __keys_.end(), __x, __compare_));
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const key_type& __x) {
const auto& __keys = __keys_;
return iterator(std::upper_bound(__keys.begin(), __keys.end(), __x, __compare_));
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator
- upper_bound(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const key_type& __x) const {
return const_iterator(std::upper_bound(__keys_.begin(), __keys_.end(), __x, __compare_));
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const _Kp& __x) {
const auto& __keys = __keys_;
return iterator(std::upper_bound(__keys.begin(), __keys.end(), __x, __compare_));
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const _Kp& __x) const {
return const_iterator(std::upper_bound(__keys_.begin(), __keys_.end(), __x, __compare_));
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator>
- equal_range(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator> equal_range(const key_type& __x) {
return __equal_range_impl(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
equal_range(const key_type& __x) const {
return __equal_range_impl(*this, __x);
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator>
- equal_range(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator> equal_range(const _Kp& __x) {
return __equal_range_impl(*this, __x);
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
- equal_range(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator> equal_range(const _Kp& __x) const {
return __equal_range_impl(*this, __x);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
- operator==(const flat_multiset& __x, const flat_multiset& __y) {
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator==(const flat_multiset& __x, const flat_multiset& __y) {
return ranges::equal(__x, __y);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 auto
- operator<=>(const flat_multiset& __x, const flat_multiset& __y) {
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 auto operator<=>(const flat_multiset& __x, const flat_multiset& __y) {
return std::lexicographical_compare_three_way(
__x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 void
swap(flat_multiset& __x, flat_multiset& __y) noexcept(noexcept(__x.swap(__y))) {
__x.swap(__y);
}
private:
template <bool _WasSorted, class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __append_sort_merge(_Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __append_sort_merge(_Args&&... __args) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
size_type __old_size = size();
__flat_set_utils::__append(*this, std::forward<_Args>(__args)...);
@@ -676,13 +632,13 @@ class flat_multiset {
}
template <class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator __emplace(_Kp&& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator __emplace(_Kp&& __key) {
auto __it = upper_bound(__key);
return __flat_set_utils::__emplace_exact_pos(*this, __it, std::forward<_Kp>(__key));
}
template <class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator __emplace_hint(const_iterator __hint, _Kp&& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator __emplace_hint(const_iterator __hint, _Kp&& __key) {
auto __prev_larger = __hint != cbegin() && __compare_(__key, *std::prev(__hint));
auto __next_smaller = __hint != cend() && __compare_(*__hint, __key);
@@ -714,7 +670,7 @@ class flat_multiset {
}
template <class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __find_impl(_Self&& __self, const _Kp& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __find_impl(_Self&& __self, const _Kp& __key) {
auto __it = __self.lower_bound(__key);
auto __last = __self.end();
if (__it == __last || __self.__compare_(__key, *__it)) {
@@ -724,14 +680,14 @@ class flat_multiset {
}
template <class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __equal_range_impl(_Self&& __self, const _Kp& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __equal_range_impl(_Self&& __self, const _Kp& __key) {
using __iter = _If<is_const_v<__libcpp_remove_reference_t<_Self>>, const_iterator, iterator>;
auto [__key_first, __key_last] =
std::equal_range(__self.__keys_.begin(), __self.__keys_.end(), __key, __self.__compare_);
return std::make_pair(__iter(__key_first), __iter(__key_last));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __reserve(size_t __size) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __reserve(size_t __size) {
if constexpr (__container_traits<_KeyContainer>::__reservable) {
__keys_.reserve(__size);
}
@@ -827,7 +783,7 @@ struct uses_allocator<flat_multiset<_Key, _Compare, _KeyContainer>, _Allocator>
: bool_constant<uses_allocator_v<_KeyContainer, _Allocator> > {};
template <class _Key, class _Compare, class _KeyContainer, class _Predicate>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 typename flat_multiset<_Key, _Compare, _KeyContainer>::size_type
+_LIBCPP_CONSTEXPR_SINCE_CXX26 typename flat_multiset<_Key, _Compare, _KeyContainer>::size_type
erase_if(flat_multiset<_Key, _Compare, _KeyContainer>& __flat_multiset, _Predicate __pred) {
auto __guard = std::__make_exception_guard([&] { __flat_multiset.clear(); });
auto __it =
diff --git a/libcxx/include/__flat_set/flat_set.h b/libcxx/include/__flat_set/flat_set.h
index 63f3b6519cb6a2..59badd2e612047 100644
--- a/libcxx/include/__flat_set/flat_set.h
+++ b/libcxx/include/__flat_set/flat_set.h
@@ -100,13 +100,13 @@ class flat_set {
public:
// [flat.set.cons], construct/copy/destroy
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set() noexcept(is_nothrow_default_constructible_v<_KeyContainer> && is_nothrow_default_constructible_v<_Compare>)
: __keys_(), __compare_() {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(const flat_set&) = default;
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(const flat_set&) = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(flat_set&& __other) noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(flat_set&& __other) noexcept(
is_nothrow_move_constructible_v<_KeyContainer> && is_nothrow_move_constructible_v<_Compare>)
# if _LIBCPP_HAS_EXCEPTIONS
try
@@ -120,16 +120,14 @@ class flat_set {
}
# endif // _LIBCPP_HAS_EXCEPTIONS
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_set(const key_compare& __comp)
- : __keys_(), __compare_(__comp) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_set(const key_compare& __comp) : __keys_(), __compare_(__comp) {}
- _LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_set(container_type __keys, const key_compare& __comp = key_compare())
: __keys_(std::move(__keys)), __compare_(__comp) {
__sort_and_unique();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(sorted_unique_t, container_type __keys, const key_compare& __comp = key_compare())
: __keys_(std::move(__keys)), __compare_(__comp) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(
@@ -138,7 +136,7 @@ class flat_set {
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(_InputIterator __first, _InputIterator __last, const key_compare& __comp = key_compare())
: __keys_(), __compare_(__comp) {
insert(__first, __last);
@@ -146,7 +144,7 @@ class flat_set {
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(sorted_unique_t, _InputIterator __first, _InputIterator __last, const key_compare& __comp = key_compare())
: __keys_(__first, __last), __compare_(__comp) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(
@@ -154,43 +152,42 @@ class flat_set {
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(from_range_t, _Range&& __rg)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(from_range_t, _Range&& __rg)
: flat_set(from_range, std::forward<_Range>(__rg), key_compare()) {}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(from_range_t, _Range&& __rg, const key_compare& __comp)
- : flat_set(__comp) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(from_range_t, _Range&& __rg, const key_compare& __comp) : flat_set(__comp) {
insert_range(std::forward<_Range>(__rg));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: flat_set(__il.begin(), __il.end(), __comp) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(sorted_unique_t, initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: flat_set(sorted_unique, __il.begin(), __il.end(), __comp) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_set(const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit flat_set(const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_() {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(const key_compare& __comp, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(const key_compare& __comp, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_(__comp) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(const container_type& __keys, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(const container_type& __keys, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_() {
__sort_and_unique();
}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(const container_type& __keys, const key_compare& __comp, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_(__comp) {
__sort_and_unique();
@@ -198,8 +195,7 @@ class flat_set {
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_set(sorted_unique_t, const container_type& __keys, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(sorted_unique_t, const container_type& __keys, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_() {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(
__is_sorted_and_unique(__keys_), "Either the key container is not sorted or it contains duplicates");
@@ -207,7 +203,7 @@ class flat_set {
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(sorted_unique_t, const container_type& __keys, const key_compare& __comp, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __keys)), __compare_(__comp) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(
@@ -216,13 +212,13 @@ class flat_set {
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(const flat_set& __other, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(const flat_set& __other, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __other.__keys_)),
__compare_(__other.__compare_) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(flat_set&& __other, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(flat_set&& __other, const _Allocator& __alloc)
# if _LIBCPP_HAS_EXCEPTIONS
try
# endif // _LIBCPP_HAS_EXCEPTIONS
@@ -238,15 +234,14 @@ class flat_set {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_set(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(_InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_() {
insert(__first, __last);
}
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(_InputIterator __first, _InputIterator __last, const key_compare& __comp, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_(__comp) {
insert(__first, __last);
@@ -254,7 +249,7 @@ class flat_set {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(sorted_unique_t, _InputIterator __first, _InputIterator __last, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __first, __last)), __compare_() {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(
@@ -263,12 +258,12 @@ class flat_set {
template <class _InputIterator, class _Allocator>
requires(__has_input_iterator_category<_InputIterator>::value && uses_allocator<container_type, _Allocator>::value)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(
- sorted_unique_t,
- _InputIterator __first,
- _InputIterator __last,
- const key_compare& __comp,
- const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
+ flat_set(sorted_unique_t,
+ _InputIterator __first,
+ _InputIterator __last,
+ const key_compare& __comp,
+ const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc, __first, __last)), __compare_(__comp) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(
__is_sorted_and_unique(__keys_), "Either the key container is not sorted or it contains duplicates");
@@ -276,14 +271,14 @@ class flat_set {
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(from_range_t, _Range&& __rg, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(from_range_t, _Range&& __rg, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_() {
insert_range(std::forward<_Range>(__rg));
}
template <_ContainerCompatibleRange<value_type> _Range, class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(from_range_t, _Range&& __rg, const key_compare& __comp, const _Allocator& __alloc)
: __keys_(std::make_obj_using_allocator<container_type>(__alloc)), __compare_(__comp) {
insert_range(std::forward<_Range>(__rg));
@@ -291,37 +286,35 @@ class flat_set {
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_set(initializer_list<value_type> __il, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(initializer_list<value_type> __il, const _Allocator& __alloc)
: flat_set(__il.begin(), __il.end(), __alloc) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(initializer_list<value_type> __il, const key_compare& __comp, const _Allocator& __alloc)
: flat_set(__il.begin(), __il.end(), __comp, __alloc) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
- flat_set(sorted_unique_t, initializer_list<value_type> __il, const _Allocator& __alloc)
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set(sorted_unique_t, initializer_list<value_type> __il, const _Allocator& __alloc)
: flat_set(sorted_unique, __il.begin(), __il.end(), __alloc) {}
template <class _Allocator>
requires uses_allocator<container_type, _Allocator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
+ _LIBCPP_CONSTEXPR_SINCE_CXX26
flat_set(sorted_unique_t, initializer_list<value_type> __il, const key_compare& __comp, const _Allocator& __alloc)
: flat_set(sorted_unique, __il.begin(), __il.end(), __comp, __alloc) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set& operator=(initializer_list<value_type> __il) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set& operator=(initializer_list<value_type> __il) {
clear();
insert(__il);
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set& operator=(const flat_set&) = default;
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set& operator=(const flat_set&) = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set& operator=(flat_set&& __other) noexcept(
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 flat_set& operator=(flat_set&& __other) noexcept(
is_nothrow_move_assignable_v<_KeyContainer> && is_nothrow_move_assignable_v<_Compare>) {
// No matter what happens, we always want to clear the other container before returning
// since we moved from it
@@ -337,61 +330,45 @@ class flat_set {
}
// iterators
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() noexcept {
return iterator(std::as_const(__keys_).begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const noexcept {
return const_iterator(__keys_.begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept {
- return iterator(std::as_const(__keys_).end());
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() noexcept { return iterator(std::as_const(__keys_).end()); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const noexcept {
return const_iterator(__keys_.end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept {
- return reverse_iterator(end());
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rbegin() noexcept { return reverse_iterator(end()); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rbegin() const noexcept {
return const_reverse_iterator(end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept {
- return reverse_iterator(begin());
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 reverse_iterator rend() noexcept { return reverse_iterator(begin()); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator rend() const noexcept {
return const_reverse_iterator(begin());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept {
- return begin();
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept {
- return end();
- }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cbegin() const noexcept { return begin(); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator cend() const noexcept { return end(); }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crbegin() const noexcept {
return const_reverse_iterator(end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_reverse_iterator crend() const noexcept {
return const_reverse_iterator(begin());
}
// [flat.set.capacity], capacity
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept {
- return __keys_.empty();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool empty() const noexcept { return __keys_.empty(); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept {
- return __keys_.size();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type size() const noexcept { return __keys_.size(); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept {
- return __keys_.max_size();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const noexcept { return __keys_.max_size(); }
// [flat.set.modifiers], modifiers
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> emplace(_Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> emplace(_Args&&... __args) {
if constexpr (sizeof...(__args) == 1 && (is_same_v<remove_cvref_t<_Args>, _Key> && ...)) {
return __emplace(std::forward<_Args>(__args)...);
} else {
@@ -400,7 +377,7 @@ class flat_set {
}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace_hint(const_iterator __hint, _Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator emplace_hint(const_iterator __hint, _Args&&... __args) {
if constexpr (sizeof...(__args) == 1 && (is_same_v<remove_cvref_t<_Args>, _Key> && ...)) {
return __emplace_hint(std::move(__hint), std::forward<_Args>(__args)...);
} else {
@@ -408,36 +385,32 @@ class flat_set {
}
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(const value_type& __x) {
- return emplace(__x);
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(const value_type& __x) { return emplace(__x); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(value_type&& __x) {
- return emplace(std::move(__x));
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(value_type&& __x) { return emplace(std::move(__x)); }
template <class _Kp>
requires(__is_transparent_v<_Compare> && is_constructible_v<value_type, _Kp>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(_Kp&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> insert(_Kp&& __x) {
return __emplace(std::forward<_Kp>(__x));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, const value_type& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, const value_type& __x) {
return emplace_hint(__hint, __x);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, value_type&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, value_type&& __x) {
return emplace_hint(__hint, std::move(__x));
}
template <class _Kp>
requires(__is_transparent_v<_Compare> && is_constructible_v<value_type, _Kp>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, _Kp&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator insert(const_iterator __hint, _Kp&& __x) {
return __emplace_hint(__hint, std::forward<_Kp>(__x));
}
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(_InputIterator __first, _InputIterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(_InputIterator __first, _InputIterator __last) {
if constexpr (sized_sentinel_for<_InputIterator, _InputIterator>) {
__reserve(__last - __first);
}
@@ -446,8 +419,7 @@ class flat_set {
template <class _InputIterator>
requires __has_input_iterator_category<_InputIterator>::value
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- insert(sorted_unique_t, _InputIterator __first, _InputIterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_unique_t, _InputIterator __first, _InputIterator __last) {
if constexpr (sized_sentinel_for<_InputIterator, _InputIterator>) {
__reserve(__last - __first);
}
@@ -456,7 +428,7 @@ class flat_set {
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(_Range&& __range) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(_Range&& __range) {
if constexpr (ranges::sized_range<_Range>) {
__reserve(ranges::size(__range));
}
@@ -465,7 +437,7 @@ class flat_set {
}
template <_ContainerCompatibleRange<value_type> _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(std::sorted_unique_t, _Range&& __range) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert_range(std::sorted_unique_t, _Range&& __range) {
if constexpr (ranges::sized_range<_Range>) {
__reserve(ranges::size(__range));
}
@@ -473,21 +445,19 @@ class flat_set {
__append_sort_merge_unique</*WasSorted = */ true>(std::forward<_Range>(__range));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) {
- insert(__il.begin(), __il.end());
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(initializer_list<value_type> __il) { insert(__il.begin(), __il.end()); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_unique_t, initializer_list<value_type> __il) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void insert(sorted_unique_t, initializer_list<value_type> __il) {
insert(sorted_unique, __il.begin(), __il.end());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 container_type extract() && {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 container_type extract() && {
auto __guard = std::__make_scope_guard([&]() noexcept { clear() /* noexcept */; });
auto __ret = std::move(__keys_);
return __ret;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void replace(container_type&& __keys) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void replace(container_type&& __keys) {
_LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(
__is_sorted_and_unique(__keys), "Either the key container is not sorted or it contains duplicates");
auto __guard = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
@@ -495,7 +465,7 @@ class flat_set {
__guard.__complete();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(iterator __position) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(iterator __position) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
auto __key_iter = __keys_.erase(__position.__base());
__on_failure.__complete();
@@ -505,7 +475,7 @@ class flat_set {
// The following overload is the same as the iterator overload
// iterator erase(const_iterator __position);
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(const key_type& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(const key_type& __x) {
auto __iter = find(__x);
if (__iter != end()) {
erase(__iter);
@@ -517,21 +487,21 @@ class flat_set {
template <class _Kp>
requires(__is_transparent_v<_Compare> && !is_convertible_v<_Kp &&, iterator> &&
!is_convertible_v<_Kp &&, const_iterator>)
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(_Kp&& __x) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type erase(_Kp&& __x) {
auto [__first, __last] = equal_range(__x);
auto __res = __last - __first;
erase(__first, __last);
return __res;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __first, const_iterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator erase(const_iterator __first, const_iterator __last) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
auto __key_it = __keys_.erase(__first.__base(), __last.__base());
__on_failure.__complete();
return iterator(std::move(__key_it));
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void
swap(flat_set& __y) noexcept(is_nothrow_swappable_v<container_type> && is_nothrow_swappable_v<key_compare>) {
auto __on_failure = std::__make_exception_guard([&]() noexcept {
clear() /* noexcept */;
@@ -542,141 +512,128 @@ class flat_set {
__on_failure.__complete();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void clear() noexcept { __keys_.clear(); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void clear() noexcept { __keys_.clear(); }
// observers
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 key_compare key_comp() const { return __compare_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare value_comp() const {
- return __compare_;
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 key_compare key_comp() const { return __compare_; }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare value_comp() const { return __compare_; }
// set operations
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) {
- return __find_impl(*this, __x);
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const key_type& __x) { return __find_impl(*this, __x); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const key_type& __x) const {
return __find_impl(*this, __x);
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator find(const _Kp& __x) {
return __find_impl(*this, __x);
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator find(const _Kp& __x) const {
return __find_impl(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const key_type& __x) const {
return contains(__x) ? 1 : 0;
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type count(const _Kp& __x) const {
return contains(__x) ? 1 : 0;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const {
- return find(__x) != end();
- }
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const key_type& __x) const { return find(__x) != end(); }
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 bool contains(const _Kp& __x) const {
return find(__x) != end();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const key_type& __x) {
const auto& __keys = __keys_;
return iterator(std::lower_bound(__keys.begin(), __keys.end(), __x, __compare_));
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator
- lower_bound(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const key_type& __x) const {
return const_iterator(std::lower_bound(__keys_.begin(), __keys_.end(), __x, __compare_));
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const _Kp& __x) {
const auto& __keys = __keys_;
return iterator(std::lower_bound(__keys.begin(), __keys.end(), __x, __compare_));
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const _Kp& __x) const {
return const_iterator(std::lower_bound(__keys_.begin(), __keys_.end(), __x, __compare_));
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const key_type& __x) {
const auto& __keys = __keys_;
return iterator(std::upper_bound(__keys.begin(), __keys.end(), __x, __compare_));
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator
- upper_bound(const key_type& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const key_type& __x) const {
return const_iterator(std::upper_bound(__keys_.begin(), __keys_.end(), __x, __compare_));
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const _Kp& __x) {
const auto& __keys = __keys_;
return iterator(std::upper_bound(__keys.begin(), __keys.end(), __x, __compare_));
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const _Kp& __x) const {
return const_iterator(std::upper_bound(__keys_.begin(), __keys_.end(), __x, __compare_));
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator>
- equal_range(const key_type& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator> equal_range(const key_type& __x) {
return __equal_range_impl(*this, __x);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
equal_range(const key_type& __x) const {
return __equal_range_impl(*this, __x);
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator>
- equal_range(const _Kp& __x) {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, iterator> equal_range(const _Kp& __x) {
return __equal_range_impl(*this, __x);
}
template <class _Kp>
requires __is_transparent_v<_Compare>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator>
- equal_range(const _Kp& __x) const {
+ [[nodiscard]] _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<const_iterator, const_iterator> equal_range(const _Kp& __x) const {
return __equal_range_impl(*this, __x);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator==(const flat_set& __x, const flat_set& __y) {
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator==(const flat_set& __x, const flat_set& __y) {
return ranges::equal(__x, __y);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 auto
- operator<=>(const flat_set& __x, const flat_set& __y) {
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 auto operator<=>(const flat_set& __x, const flat_set& __y) {
return std::lexicographical_compare_three_way(
__x.begin(), __x.end(), __y.begin(), __y.end(), std::__synth_three_way);
}
- friend _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
- swap(flat_set& __x, flat_set& __y) noexcept(noexcept(__x.swap(__y))) {
+ friend _LIBCPP_CONSTEXPR_SINCE_CXX26 void swap(flat_set& __x, flat_set& __y) noexcept(noexcept(__x.swap(__y))) {
__x.swap(__y);
}
private:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __is_sorted_and_unique(auto&& __key_container) const {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __is_sorted_and_unique(auto&& __key_container) const {
auto __greater_or_equal_to = [this](const auto& __x, const auto& __y) -> bool { return !__compare_(__x, __y); };
return ranges::adjacent_find(__key_container, __greater_or_equal_to) == ranges::end(__key_container);
}
@@ -684,14 +641,14 @@ class flat_set {
// This function is only used in constructors. So there is not exception handling in this function.
// If the function exits via an exception, there will be no flat_set object constructed, thus, there
// is no invariant state to preserve
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __sort_and_unique() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __sort_and_unique() {
ranges::sort(__keys_, __compare_);
auto __dup_start = ranges::unique(__keys_, __key_equiv(__compare_)).begin();
__keys_.erase(__dup_start, __keys_.end());
}
template <bool _WasSorted, class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __append_sort_merge_unique(_Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __append_sort_merge_unique(_Args&&... __args) {
auto __on_failure = std::__make_exception_guard([&]() noexcept { clear() /* noexcept */; });
size_type __old_size = size();
__flat_set_utils::__append(*this, std::forward<_Args>(__args)...);
@@ -711,7 +668,7 @@ class flat_set {
}
template <class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __find_impl(_Self&& __self, const _Kp& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __find_impl(_Self&& __self, const _Kp& __key) {
auto __it = __self.lower_bound(__key);
auto __last = __self.end();
if (__it == __last || __self.__compare_(__key, *__it)) {
@@ -721,7 +678,7 @@ class flat_set {
}
template <class _Self, class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __equal_range_impl(_Self&& __self, const _Kp& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __equal_range_impl(_Self&& __self, const _Kp& __key) {
using __iter = _If<is_const_v<__libcpp_remove_reference_t<_Self>>, const_iterator, iterator>;
auto __it = std::lower_bound(__self.__keys_.begin(), __self.__keys_.end(), __key, __self.__compare_);
auto __last = __self.__keys_.end();
@@ -732,7 +689,7 @@ class flat_set {
}
template <class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> __emplace(_Kp&& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 pair<iterator, bool> __emplace(_Kp&& __key) {
auto __it = lower_bound(__key);
if (__it == end() || __compare_(__key, *__it)) {
return pair<iterator, bool>(__flat_set_utils::__emplace_exact_pos(*this, __it, std::forward<_Kp>(__key)), true);
@@ -742,7 +699,7 @@ class flat_set {
}
template <class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __is_hint_correct(const_iterator __hint, _Kp&& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __is_hint_correct(const_iterator __hint, _Kp&& __key) {
if (__hint != cbegin() && !__compare_(*std::prev(__hint), __key)) {
return false;
}
@@ -753,7 +710,7 @@ class flat_set {
}
template <class _Kp>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator __emplace_hint(const_iterator __hint, _Kp&& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator __emplace_hint(const_iterator __hint, _Kp&& __key) {
if (__is_hint_correct(__hint, __key)) {
if (__hint == cend() || __compare_(__key, *__hint)) {
return __flat_set_utils::__emplace_exact_pos(*this, __hint, std::forward<_Kp>(__key));
@@ -766,7 +723,7 @@ class flat_set {
}
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __reserve(size_t __size) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __reserve(size_t __size) {
if constexpr (__container_traits<_KeyContainer>::__reservable) {
__keys_.reserve(__size);
}
@@ -780,9 +737,8 @@ class flat_set {
_LIBCPP_NO_UNIQUE_ADDRESS key_compare __compare_;
struct __key_equiv {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_equiv(key_compare __c) : __comp_(__c) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool
- operator()(const_reference __x, const_reference __y) const {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 __key_equiv(key_compare __c) : __comp_(__c) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 bool operator()(const_reference __x, const_reference __y) const {
return !__comp_(__x, __y) && !__comp_(__y, __x);
}
key_compare __comp_;
@@ -869,7 +825,7 @@ struct uses_allocator<flat_set<_Key, _Compare, _KeyContainer>, _Allocator>
: bool_constant<uses_allocator_v<_KeyContainer, _Allocator>> {};
template <class _Key, class _Compare, class _KeyContainer, class _Predicate>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 typename flat_set<_Key, _Compare, _KeyContainer>::size_type
+_LIBCPP_CONSTEXPR_SINCE_CXX26 typename flat_set<_Key, _Compare, _KeyContainer>::size_type
erase_if(flat_set<_Key, _Compare, _KeyContainer>& __flat_set, _Predicate __pred) {
auto __guard = std::__make_exception_guard([&] { __flat_set.clear(); });
auto __it = std::remove_if(__flat_set.__keys_.begin(), __flat_set.__keys_.end(), [&](const auto& __e) -> bool {
diff --git a/libcxx/include/__flat_set/ra_iterator.h b/libcxx/include/__flat_set/ra_iterator.h
index 6fac62895a0c6f..c828608fe15098 100644
--- a/libcxx/include/__flat_set/ra_iterator.h
+++ b/libcxx/include/__flat_set/ra_iterator.h
@@ -52,98 +52,90 @@ struct __ra_iterator {
using value_type = iter_value_t<_Iterator>;
using difference_type = iter_difference_t<_Iterator>;
- _LIBCPP_HIDE_FROM_ABI __ra_iterator()
+ __ra_iterator()
requires is_default_constructible_v<_Iterator>
= default;
- _LIBCPP_HIDE_FROM_ABI explicit constexpr __ra_iterator(_Iterator __iter) : __iter_(std::move(__iter)) {}
+ explicit constexpr __ra_iterator(_Iterator __iter) : __iter_(std::move(__iter)) {}
- _LIBCPP_HIDE_FROM_ABI constexpr _Iterator __base() const noexcept(noexcept(_Iterator(__iter_))) { return __iter_; }
+ constexpr _Iterator __base() const noexcept(noexcept(_Iterator(__iter_))) { return __iter_; }
- _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*() const { return *__iter_; }
- _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator->() const
+ constexpr decltype(auto) operator*() const { return *__iter_; }
+ constexpr decltype(auto) operator->() const
requires requires { __iter_.operator->(); }
{
return __iter_.operator->();
}
- _LIBCPP_HIDE_FROM_ABI constexpr __ra_iterator& operator++() {
+ constexpr __ra_iterator& operator++() {
++__iter_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __ra_iterator operator++(int) {
+ constexpr __ra_iterator operator++(int) {
__ra_iterator __tmp(*this);
++*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __ra_iterator& operator--() {
+ constexpr __ra_iterator& operator--() {
--__iter_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __ra_iterator operator--(int) {
+ constexpr __ra_iterator operator--(int) {
__ra_iterator __tmp(*this);
--*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __ra_iterator& operator+=(difference_type __x) {
+ constexpr __ra_iterator& operator+=(difference_type __x) {
__iter_ += __x;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __ra_iterator& operator-=(difference_type __x) {
+ constexpr __ra_iterator& operator-=(difference_type __x) {
__iter_ -= __x;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator[](difference_type __n) const { return *(*this + __n); }
+ constexpr decltype(auto) operator[](difference_type __n) const { return *(*this + __n); }
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __ra_iterator& __x, const __ra_iterator& __y) {
+ friend constexpr bool operator==(const __ra_iterator& __x, const __ra_iterator& __y) {
return __x.__iter_ == __y.__iter_;
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator<(const __ra_iterator& __x, const __ra_iterator& __y) {
+ friend constexpr bool operator<(const __ra_iterator& __x, const __ra_iterator& __y) {
return __x.__iter_ < __y.__iter_;
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator>(const __ra_iterator& __x, const __ra_iterator& __y) {
- return __y < __x;
- }
+ friend constexpr bool operator>(const __ra_iterator& __x, const __ra_iterator& __y) { return __y < __x; }
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator<=(const __ra_iterator& __x, const __ra_iterator& __y) {
- return !(__y < __x);
- }
+ friend constexpr bool operator<=(const __ra_iterator& __x, const __ra_iterator& __y) { return !(__y < __x); }
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator>=(const __ra_iterator& __x, const __ra_iterator& __y) {
- return !(__x < __y);
- }
+ friend constexpr bool operator>=(const __ra_iterator& __x, const __ra_iterator& __y) { return !(__x < __y); }
- _LIBCPP_HIDE_FROM_ABI friend constexpr auto operator<=>(const __ra_iterator& __x, const __ra_iterator& __y)
+ friend constexpr auto operator<=>(const __ra_iterator& __x, const __ra_iterator& __y)
requires three_way_comparable<_Iterator>
{
return __x.__iter_ <=> __y.__iter_;
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr __ra_iterator operator+(const __ra_iterator& __i, difference_type __n) {
+ friend constexpr __ra_iterator operator+(const __ra_iterator& __i, difference_type __n) {
auto __tmp = __i;
__tmp += __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr __ra_iterator operator+(difference_type __n, const __ra_iterator& __i) {
- return __i + __n;
- }
+ friend constexpr __ra_iterator operator+(difference_type __n, const __ra_iterator& __i) { return __i + __n; }
- _LIBCPP_HIDE_FROM_ABI friend constexpr __ra_iterator operator-(const __ra_iterator& __i, difference_type __n) {
+ friend constexpr __ra_iterator operator-(const __ra_iterator& __i, difference_type __n) {
auto __tmp = __i;
__tmp -= __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr difference_type operator-(const __ra_iterator& __x, const __ra_iterator& __y) {
+ friend constexpr difference_type operator-(const __ra_iterator& __x, const __ra_iterator& __y) {
return __x.__iter_ - __y.__iter_;
}
};
diff --git a/libcxx/include/__flat_set/utils.h b/libcxx/include/__flat_set/utils.h
index 8a7f93a00465d8..f2fb5aab6940f7 100644
--- a/libcxx/include/__flat_set/utils.h
+++ b/libcxx/include/__flat_set/utils.h
@@ -38,8 +38,7 @@ struct __flat_set_utils {
// When an exception is thrown during the emplacement, the function will clear the set if the container does not
// have strong exception safety guarantee on emplacement.
template <class _Set, class _Iter, class _KeyArg>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto
- __emplace_exact_pos(_Set& __set, _Iter&& __iter, _KeyArg&& __key) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static auto __emplace_exact_pos(_Set& __set, _Iter&& __iter, _KeyArg&& __key) {
using _KeyContainer = typename decay_t<_Set>::container_type;
auto __on_failure = std::__make_exception_guard([&]() noexcept {
if constexpr (!__container_traits<_KeyContainer>::__emplacement_has_strong_exception_safety_guarantee) {
@@ -52,13 +51,12 @@ struct __flat_set_utils {
}
template <class _Set, class _InputIterator>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static void
- __append(_Set& __set, _InputIterator __first, _InputIterator __last) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static void __append(_Set& __set, _InputIterator __first, _InputIterator __last) {
__set.__keys_.insert(__set.__keys_.end(), std::move(__first), std::move(__last));
}
template <class _Set, class _Range>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 static void __append(_Set& __set, _Range&& __rng) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 static void __append(_Set& __set, _Range&& __rng) {
if constexpr (requires { __set.__keys_.insert_range(__set.__keys_.end(), std::forward<_Range>(__rng)); }) {
// C++23 Sequence Container should have insert_range member function
// Note that not all Sequence Containers provide append_range.
diff --git a/libcxx/include/__format/buffer.h b/libcxx/include/__format/buffer.h
index f53f4d60b7d4c4..8cce88d3dbe093 100644
--- a/libcxx/include/__format/buffer.h
+++ b/libcxx/include/__format/buffer.h
@@ -55,21 +55,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace __format {
// A helper to limit the total size of code units written.
-class _LIBCPP_HIDE_FROM_ABI __max_output_size {
+class __max_output_size {
public:
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI explicit __max_output_size(size_t __max_size) : __max_size_{__max_size} {}
+ [[nodiscard]] explicit __max_output_size(size_t __max_size) : __max_size_{__max_size} {}
// This function adjusts the size of a (bulk) write operations. It ensures the
// number of code units written by a __output_buffer never exceeds
// __max_size_ code units.
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI size_t __write_request(size_t __code_units) {
+ [[nodiscard]] size_t __write_request(size_t __code_units) {
size_t __result =
__code_units_written_ < __max_size_ ? std::min(__code_units, __max_size_ - __code_units_written_) : 0;
__code_units_written_ += __code_units;
return __result;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI size_t __code_units_written() const noexcept { return __code_units_written_; }
+ [[nodiscard]] size_t __code_units_written() const noexcept { return __code_units_written_; }
private:
size_t __max_size_;
@@ -185,24 +185,24 @@ class __output_buffer {
using __prepare_write_type _LIBCPP_NODEBUG = void (*)(__output_buffer<_CharT>&, size_t);
[[nodiscard]]
- _LIBCPP_HIDE_FROM_ABI explicit __output_buffer(_CharT* __ptr, size_t __capacity, __prepare_write_type __function)
+ explicit __output_buffer(_CharT* __ptr, size_t __capacity, __prepare_write_type __function)
: __output_buffer{__ptr, __capacity, __function, nullptr} {}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI explicit __output_buffer(
+ [[nodiscard]] explicit __output_buffer(
_CharT* __ptr, size_t __capacity, __prepare_write_type __function, __max_output_size* __max_output_size)
: __ptr_(__ptr), __capacity_(__capacity), __prepare_write_(__function), __max_output_size_(__max_output_size) {}
- _LIBCPP_HIDE_FROM_ABI void __buffer_flushed() { __size_ = 0; }
+ void __buffer_flushed() { __size_ = 0; }
- _LIBCPP_HIDE_FROM_ABI void __buffer_moved(_CharT* __ptr, size_t __capacity) {
+ void __buffer_moved(_CharT* __ptr, size_t __capacity) {
__ptr_ = __ptr;
__capacity_ = __capacity;
}
- _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return std::back_insert_iterator{*this}; }
+ auto __make_output_iterator() { return std::back_insert_iterator{*this}; }
// Used in std::back_insert_iterator.
- _LIBCPP_HIDE_FROM_ABI void push_back(_CharT __c) {
+ void push_back(_CharT __c) {
if (__max_output_size_ && __max_output_size_->__write_request(1) == 0)
return;
@@ -222,7 +222,7 @@ class __output_buffer {
/// Since some of the input is generated by std::to_chars, there needs to be a
/// conversion when _CharT is wchar_t.
template <__fmt_char_type _InCharT>
- _LIBCPP_HIDE_FROM_ABI void __copy(basic_string_view<_InCharT> __str) {
+ void __copy(basic_string_view<_InCharT> __str) {
// When the underlying iterator is a simple iterator the __capacity_ is
// infinite. For a string or container back_inserter it isn't. This means
// that adding a large string to the buffer can cause some overhead. In that
@@ -262,7 +262,7 @@ class __output_buffer {
template <contiguous_iterator _Iterator,
class _UnaryOperation,
__fmt_char_type _InCharT = typename iterator_traits<_Iterator>::value_type>
- _LIBCPP_HIDE_FROM_ABI void __transform(_Iterator __first, _Iterator __last, _UnaryOperation __operation) {
+ void __transform(_Iterator __first, _Iterator __last, _UnaryOperation __operation) {
_LIBCPP_ASSERT_INTERNAL(__first <= __last, "not a valid range");
size_t __n = static_cast<size_t>(__last - __first);
@@ -287,7 +287,7 @@ class __output_buffer {
}
/// A \c fill_n wrapper.
- _LIBCPP_HIDE_FROM_ABI void __fill(size_t __n, _CharT __value) {
+ void __fill(size_t __n, _CharT __value) {
if (__max_output_size_) {
__n = __max_output_size_->__write_request(__n);
if (__n == 0)
@@ -307,8 +307,8 @@ class __output_buffer {
__prepare_write(0);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI size_t __capacity() const { return __capacity_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI size_t __size() const { return __size_; }
+ [[nodiscard]] size_t __capacity() const { return __capacity_; }
+ [[nodiscard]] size_t __size() const { return __size_; }
private:
_CharT* __ptr_;
@@ -317,9 +317,9 @@ class __output_buffer {
void (*__prepare_write_)(__output_buffer<_CharT>&, size_t);
__max_output_size* __max_output_size_;
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI size_t __available() const { return __capacity_ - __size_; }
+ [[nodiscard]] size_t __available() const { return __capacity_ - __size_; }
- _LIBCPP_HIDE_FROM_ABI void __prepare_write(size_t __code_units) {
+ void __prepare_write(size_t __code_units) {
// Always have space for one additional code unit. This is a precondition of the push_back function.
__code_units += 1;
if (__available() < __code_units)
@@ -367,18 +367,18 @@ class __allocating_buffer : public __output_buffer<_CharT> {
__allocating_buffer(const __allocating_buffer&) = delete;
__allocating_buffer& operator=(const __allocating_buffer&) = delete;
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI __allocating_buffer() : __allocating_buffer{nullptr} {}
+ [[nodiscard]] __allocating_buffer() : __allocating_buffer{nullptr} {}
[[nodiscard]]
- _LIBCPP_HIDE_FROM_ABI explicit __allocating_buffer(__max_output_size* __max_output_size)
+ explicit __allocating_buffer(__max_output_size* __max_output_size)
: __output_buffer<_CharT>{__small_buffer_, __buffer_size_, __prepare_write, __max_output_size} {}
- _LIBCPP_HIDE_FROM_ABI ~__allocating_buffer() {
+ ~__allocating_buffer() {
if (__ptr_ != __small_buffer_)
_Alloc{}.deallocate(__ptr_, this->__capacity());
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI basic_string_view<_CharT> __view() { return {__ptr_, this->__size()}; }
+ [[nodiscard]] basic_string_view<_CharT> __view() { return {__ptr_, this->__size()}; }
private:
using _Alloc _LIBCPP_NODEBUG = allocator<_CharT>;
@@ -390,7 +390,7 @@ class __allocating_buffer : public __output_buffer<_CharT> {
_CharT* __ptr_{__small_buffer_};
- _LIBCPP_HIDE_FROM_ABI void __grow_buffer(size_t __capacity) {
+ void __grow_buffer(size_t __capacity) {
if (__capacity < __buffer_size_)
return;
@@ -408,11 +408,11 @@ class __allocating_buffer : public __output_buffer<_CharT> {
this->__buffer_moved(__ptr_, __result.count);
}
- _LIBCPP_HIDE_FROM_ABI void __prepare_write(size_t __size_hint) {
+ void __prepare_write(size_t __size_hint) {
__grow_buffer(std::max<size_t>(this->__capacity() + __size_hint, this->__capacity() * 1.6));
}
- _LIBCPP_HIDE_FROM_ABI static void __prepare_write(__output_buffer<_CharT>& __buffer, size_t __size_hint) {
+ static void __prepare_write(__output_buffer<_CharT>& __buffer, size_t __size_hint) {
static_cast<__allocating_buffer<_CharT>&>(__buffer).__prepare_write(__size_hint);
}
};
@@ -421,15 +421,14 @@ class __allocating_buffer : public __output_buffer<_CharT> {
template <class _OutIt, __fmt_char_type _CharT>
class __direct_iterator_buffer : public __output_buffer<_CharT> {
public:
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI explicit __direct_iterator_buffer(_OutIt __out_it)
- : __direct_iterator_buffer{__out_it, nullptr} {}
+ [[nodiscard]] explicit __direct_iterator_buffer(_OutIt __out_it) : __direct_iterator_buffer{__out_it, nullptr} {}
[[nodiscard]]
- _LIBCPP_HIDE_FROM_ABI explicit __direct_iterator_buffer(_OutIt __out_it, __max_output_size* __max_output_size)
+ explicit __direct_iterator_buffer(_OutIt __out_it, __max_output_size* __max_output_size)
: __output_buffer<_CharT>{std::__unwrap_iter(__out_it), __buffer_size, __prepare_write, __max_output_size},
__out_it_(__out_it) {}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI _OutIt __out_it() && { return __out_it_ + this->__size(); }
+ [[nodiscard]] _OutIt __out_it() && { return __out_it_ + this->__size(); }
private:
// The function format_to expects a buffer large enough for the output. The
@@ -440,8 +439,7 @@ class __direct_iterator_buffer : public __output_buffer<_CharT> {
_OutIt __out_it_;
- _LIBCPP_HIDE_FROM_ABI static void
- __prepare_write([[maybe_unused]] __output_buffer<_CharT>& __buffer, [[maybe_unused]] size_t __size_hint) {
+ static void __prepare_write([[maybe_unused]] __output_buffer<_CharT>& __buffer, [[maybe_unused]] size_t __size_hint) {
std::__throw_length_error("__direct_iterator_buffer");
}
};
@@ -450,15 +448,15 @@ class __direct_iterator_buffer : public __output_buffer<_CharT> {
template <class _OutIt, __fmt_char_type _CharT>
class __container_inserter_buffer : public __output_buffer<_CharT> {
public:
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI explicit __container_inserter_buffer(_OutIt __out_it)
+ [[nodiscard]] explicit __container_inserter_buffer(_OutIt __out_it)
: __container_inserter_buffer{__out_it, nullptr} {}
[[nodiscard]]
- _LIBCPP_HIDE_FROM_ABI explicit __container_inserter_buffer(_OutIt __out_it, __max_output_size* __max_output_size)
+ explicit __container_inserter_buffer(_OutIt __out_it, __max_output_size* __max_output_size)
: __output_buffer<_CharT>{__small_buffer_, __buffer_size, __prepare_write, __max_output_size},
__container_{__out_it.__get_container()} {}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI auto __out_it() && {
+ [[nodiscard]] auto __out_it() && {
__container_->insert(__container_->end(), __small_buffer_, __small_buffer_ + this->__size());
return std::back_inserter(*__container_);
}
@@ -473,13 +471,12 @@ class __container_inserter_buffer : public __output_buffer<_CharT> {
static constexpr size_t __buffer_size = 256;
_CharT __small_buffer_[__buffer_size];
- _LIBCPP_HIDE_FROM_ABI void __prepare_write() {
+ void __prepare_write() {
__container_->insert(__container_->end(), __small_buffer_, __small_buffer_ + this->__size());
this->__buffer_flushed();
}
- _LIBCPP_HIDE_FROM_ABI static void
- __prepare_write(__output_buffer<_CharT>& __buffer, [[maybe_unused]] size_t __size_hint) {
+ static void __prepare_write(__output_buffer<_CharT>& __buffer, [[maybe_unused]] size_t __size_hint) {
static_cast<__container_inserter_buffer<_OutIt, _CharT>&>(__buffer).__prepare_write();
}
};
@@ -491,15 +488,13 @@ class __container_inserter_buffer : public __output_buffer<_CharT> {
template <class _OutIt, __fmt_char_type _CharT>
class __iterator_buffer : public __allocating_buffer<_CharT> {
public:
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI explicit __iterator_buffer(_OutIt __out_it)
+ [[nodiscard]] explicit __iterator_buffer(_OutIt __out_it)
: __allocating_buffer<_CharT>{}, __out_it_{std::move(__out_it)} {}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI explicit __iterator_buffer(_OutIt __out_it, __max_output_size* __max_output_size)
+ [[nodiscard]] explicit __iterator_buffer(_OutIt __out_it, __max_output_size* __max_output_size)
: __allocating_buffer<_CharT>{__max_output_size}, __out_it_{std::move(__out_it)} {}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI auto __out_it() && {
- return std::ranges::copy(this->__view(), std::move(__out_it_)).out;
- }
+ [[nodiscard]] auto __out_it() && { return std::ranges::copy(this->__view(), std::move(__out_it_)).out; }
private:
_OutIt __out_it_;
@@ -525,13 +520,13 @@ class __format_to_n_buffer : private __buffer_selector<_OutIt, _CharT>::type {
public:
using _Base _LIBCPP_NODEBUG = __buffer_selector<_OutIt, _CharT>::type;
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI __format_to_n_buffer(_OutIt __out_it, iter_difference_t<_OutIt> __n)
+ [[nodiscard]] __format_to_n_buffer(_OutIt __out_it, iter_difference_t<_OutIt> __n)
: _Base{std::move(__out_it), std::addressof(__max_output_size_)},
__max_output_size_{__n < 0 ? size_t{0} : static_cast<size_t>(__n)} {}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return _Base::__make_output_iterator(); }
+ [[nodiscard]] auto __make_output_iterator() { return _Base::__make_output_iterator(); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __result() && {
+ [[nodiscard]] format_to_n_result<_OutIt> __result() && {
return {static_cast<_Base&&>(*this).__out_it(),
static_cast<iter_difference_t<_OutIt>>(__max_output_size_.__code_units_written())};
}
@@ -549,20 +544,18 @@ class __formatted_size_buffer : private __output_buffer<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __output_buffer<_CharT>;
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI __formatted_size_buffer()
- : _Base{nullptr, 0, __prepare_write, std::addressof(__max_output_size_)} {}
+ [[nodiscard]] __formatted_size_buffer() : _Base{nullptr, 0, __prepare_write, std::addressof(__max_output_size_)} {}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return _Base::__make_output_iterator(); }
+ [[nodiscard]] auto __make_output_iterator() { return _Base::__make_output_iterator(); }
// This function does not need to be r-value qualified, however this is
// consistent with similar objects.
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI size_t __result() && { return __max_output_size_.__code_units_written(); }
+ [[nodiscard]] size_t __result() && { return __max_output_size_.__code_units_written(); }
private:
__max_output_size __max_output_size_{0};
- _LIBCPP_HIDE_FROM_ABI static void
- __prepare_write([[maybe_unused]] __output_buffer<_CharT>& __buffer, [[maybe_unused]] size_t __size_hint) {
+ static void __prepare_write([[maybe_unused]] __output_buffer<_CharT>& __buffer, [[maybe_unused]] size_t __size_hint) {
// Note this function does not satisfy the requirement of giving a 1 code unit buffer.
_LIBCPP_ASSERT_INTERNAL(
false, "Since __max_output_size_.__max_size_ == 0 there should never be call to this function.");
@@ -598,27 +591,26 @@ class __retarget_buffer {
using difference_type _LIBCPP_NODEBUG = ptrdiff_t;
using value_type _LIBCPP_NODEBUG = _CharT;
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __iterator(__retarget_buffer& __buffer)
- : __buffer_(std::addressof(__buffer)) {}
- _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator=(const _CharT& __c) {
+ constexpr explicit __iterator(__retarget_buffer& __buffer) : __buffer_(std::addressof(__buffer)) {}
+ constexpr __iterator& operator=(const _CharT& __c) {
__buffer_->push_back(__c);
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator=(_CharT&& __c) {
+ constexpr __iterator& operator=(_CharT&& __c) {
__buffer_->push_back(__c);
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator*() { return *this; }
- _LIBCPP_HIDE_FROM_ABI constexpr __iterator& operator++() { return *this; }
- _LIBCPP_HIDE_FROM_ABI constexpr __iterator operator++(int) { return *this; }
+ constexpr __iterator& operator*() { return *this; }
+ constexpr __iterator& operator++() { return *this; }
+ constexpr __iterator operator++(int) { return *this; }
__retarget_buffer* __buffer_;
};
__retarget_buffer(const __retarget_buffer&) = delete;
__retarget_buffer& operator=(const __retarget_buffer&) = delete;
- _LIBCPP_HIDE_FROM_ABI explicit __retarget_buffer(size_t __size_hint) {
+ explicit __retarget_buffer(size_t __size_hint) {
// When the initial size is very small a lot of resizes happen
// when elements added. So use a hard-coded minimum size.
//
@@ -631,14 +623,14 @@ class __retarget_buffer {
__capacity_ = __result.count;
}
- _LIBCPP_HIDE_FROM_ABI ~__retarget_buffer() {
+ ~__retarget_buffer() {
std::destroy_n(__ptr_, __size_);
allocator_traits<_Alloc>::deallocate(__alloc_, __ptr_, __capacity_);
}
- _LIBCPP_HIDE_FROM_ABI __iterator __make_output_iterator() { return __iterator{*this}; }
+ __iterator __make_output_iterator() { return __iterator{*this}; }
- _LIBCPP_HIDE_FROM_ABI void push_back(_CharT __c) {
+ void push_back(_CharT __c) {
std::construct_at(__ptr_ + __size_, __c);
++__size_;
@@ -647,7 +639,7 @@ class __retarget_buffer {
}
template <__fmt_char_type _InCharT>
- _LIBCPP_HIDE_FROM_ABI void __copy(basic_string_view<_InCharT> __str) {
+ void __copy(basic_string_view<_InCharT> __str) {
size_t __n = __str.size();
if (__size_ + __n >= __capacity_)
// Push_back requires the buffer to have room for at least one character.
@@ -660,7 +652,7 @@ class __retarget_buffer {
template <contiguous_iterator _Iterator,
class _UnaryOperation,
__fmt_char_type _InCharT = typename iterator_traits<_Iterator>::value_type>
- _LIBCPP_HIDE_FROM_ABI void __transform(_Iterator __first, _Iterator __last, _UnaryOperation __operation) {
+ void __transform(_Iterator __first, _Iterator __last, _UnaryOperation __operation) {
_LIBCPP_ASSERT_INTERNAL(__first <= __last, "not a valid range");
size_t __n = static_cast<size_t>(__last - __first);
@@ -673,7 +665,7 @@ class __retarget_buffer {
__size_ += __n;
}
- _LIBCPP_HIDE_FROM_ABI void __fill(size_t __n, _CharT __value) {
+ void __fill(size_t __n, _CharT __value) {
if (__size_ + __n >= __capacity_)
// Push_back requires the buffer to have room for at least one character.
__grow_buffer(__size_ + __n + 1);
@@ -682,12 +674,12 @@ class __retarget_buffer {
__size_ += __n;
}
- _LIBCPP_HIDE_FROM_ABI basic_string_view<_CharT> __view() { return {__ptr_, __size_}; }
+ basic_string_view<_CharT> __view() { return {__ptr_, __size_}; }
private:
- _LIBCPP_HIDE_FROM_ABI void __grow_buffer() { __grow_buffer(__capacity_ * 1.6); }
+ void __grow_buffer() { __grow_buffer(__capacity_ * 1.6); }
- _LIBCPP_HIDE_FROM_ABI void __grow_buffer(size_t __capacity) {
+ void __grow_buffer(size_t __capacity) {
_LIBCPP_ASSERT_INTERNAL(__capacity > __capacity_, "the buffer must grow");
auto __result = std::__allocate_at_least(__alloc_, __capacity);
auto __guard = std::__make_exception_guard([&] {
diff --git a/libcxx/include/__format/container_adaptor.h b/libcxx/include/__format/container_adaptor.h
index 09803ee3ac5d95..b116f3132baaac 100644
--- a/libcxx/include/__format/container_adaptor.h
+++ b/libcxx/include/__format/container_adaptor.h
@@ -43,13 +43,12 @@ struct __formatter_container_adaptor {
public:
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
return __underlying_.parse(__ctx);
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
- format(__maybe_const_adaptor& __adaptor, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(__maybe_const_adaptor& __adaptor, _FormatContext& __ctx) const {
return __underlying_.format(__adaptor.__get_container(), __ctx);
}
};
diff --git a/libcxx/include/__format/escaped_output_table.h b/libcxx/include/__format/escaped_output_table.h
index 7b6a03162c4905..6f6d1ca78a85b2 100644
--- a/libcxx/include/__format/escaped_output_table.h
+++ b/libcxx/include/__format/escaped_output_table.h
@@ -859,7 +859,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr uint32_t __entries[735] = {
///
/// \\pre The code point is a valid Unicode code point.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool __needs_escape(const char32_t __code_point) noexcept {
+[[nodiscard]] constexpr bool __needs_escape(const char32_t __code_point) noexcept {
// The entries in the gap at the end.
if(__code_point >= 0x000e0100 && __code_point <= 0x000e01ef)
diff --git a/libcxx/include/__format/extended_grapheme_cluster_table.h b/libcxx/include/__format/extended_grapheme_cluster_table.h
index 6da07862d41e66..6e032879f365f0 100644
--- a/libcxx/include/__format/extended_grapheme_cluster_table.h
+++ b/libcxx/include/__format/extended_grapheme_cluster_table.h
@@ -1630,7 +1630,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr uint32_t __entries[1501] = {
// clang-format on
/// Returns the extended grapheme cluster bondary property of a code point.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __property __get_property(const char32_t __code_point) noexcept {
+[[nodiscard]] constexpr __property __get_property(const char32_t __code_point) noexcept {
// The algorithm searches for the upper bound of the range and, when found,
// steps back one entry. This algorithm is used since the code point can be
// anywhere in the range. After a lower bound is found the next step is to
diff --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h
index 4f52c6ab2c3e4d..cd716d366d32e0 100644
--- a/libcxx/include/__format/format_arg.h
+++ b/libcxx/include/__format/format_arg.h
@@ -83,11 +83,9 @@ inline constexpr uint8_t __packed_arg_t_mask = 0x1f;
inline constexpr unsigned __packed_types_storage_bits = 64;
inline constexpr unsigned __packed_types_max = __packed_types_storage_bits / __packed_arg_t_bits;
-_LIBCPP_HIDE_FROM_ABI constexpr bool __use_packed_format_arg_store(size_t __size) {
- return __size <= __packed_types_max;
-}
+constexpr bool __use_packed_format_arg_store(size_t __size) { return __size <= __packed_types_max; }
-_LIBCPP_HIDE_FROM_ABI constexpr __arg_t __get_packed_type(uint64_t __types, size_t __id) {
+constexpr __arg_t __get_packed_type(uint64_t __types, size_t __id) {
_LIBCPP_ASSERT_INTERNAL(__id <= __packed_types_max, "");
if (__id > 0)
@@ -101,7 +99,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __arg_t __get_packed_type(uint64_t __types, size
// This function is not user observable, so it can directly use the non-standard
// types of the "variant". See __arg_t for more details.
template <class _Visitor, class _Context>
-_LIBCPP_HIDE_FROM_ABI decltype(auto) __visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
+decltype(auto) __visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
switch (__arg.__type_) {
case __format::__arg_t::__none:
return std::invoke(std::forward<_Visitor>(__vis), __arg.__value_.__monostate_);
@@ -152,7 +150,7 @@ _LIBCPP_HIDE_FROM_ABI decltype(auto) __visit_format_arg(_Visitor&& __vis, basic_
# if _LIBCPP_STD_VER >= 26
template <class _Rp, class _Visitor, class _Context>
-_LIBCPP_HIDE_FROM_ABI _Rp __visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
+_Rp __visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
switch (__arg.__type_) {
case __format::__arg_t::__none:
return std::invoke_r<_Rp>(std::forward<_Visitor>(__vis), __arg.__value_.__monostate_);
@@ -214,7 +212,7 @@ class __basic_format_arg_value {
/// Contains the implementation for basic_format_arg::handle.
struct __handle {
template <class _Tp>
- _LIBCPP_HIDE_FROM_ABI explicit __handle(_Tp& __v) noexcept
+ explicit __handle(_Tp& __v) noexcept
: __ptr_(std::addressof(__v)),
__format_([](basic_format_parse_context<_CharT>& __parse_ctx, _Context& __ctx, const void* __ptr) {
using _Dp = remove_const_t<_Tp>;
@@ -254,26 +252,24 @@ class __basic_format_arg_value {
// These constructors contain the exact storage type used. If adjustments are
// required, these will be done in __create_format_arg.
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value() noexcept : __monostate_() {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(bool __value) noexcept : __boolean_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(_CharT __value) noexcept : __char_type_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(int __value) noexcept : __int_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(unsigned __value) noexcept : __unsigned_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(long long __value) noexcept : __long_long_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(unsigned long long __value) noexcept
- : __unsigned_long_long_(__value) {}
+ __basic_format_arg_value() noexcept : __monostate_() {}
+ __basic_format_arg_value(bool __value) noexcept : __boolean_(__value) {}
+ __basic_format_arg_value(_CharT __value) noexcept : __char_type_(__value) {}
+ __basic_format_arg_value(int __value) noexcept : __int_(__value) {}
+ __basic_format_arg_value(unsigned __value) noexcept : __unsigned_(__value) {}
+ __basic_format_arg_value(long long __value) noexcept : __long_long_(__value) {}
+ __basic_format_arg_value(unsigned long long __value) noexcept : __unsigned_long_long_(__value) {}
# if _LIBCPP_HAS_INT128
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(__int128_t __value) noexcept : __i128_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(__uint128_t __value) noexcept : __u128_(__value) {}
+ __basic_format_arg_value(__int128_t __value) noexcept : __i128_(__value) {}
+ __basic_format_arg_value(__uint128_t __value) noexcept : __u128_(__value) {}
# endif
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(float __value) noexcept : __float_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(double __value) noexcept : __double_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(long double __value) noexcept : __long_double_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(const _CharT* __value) noexcept : __const_char_type_ptr_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(basic_string_view<_CharT> __value) noexcept
- : __string_view_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(const void* __value) noexcept : __ptr_(__value) {}
- _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(__handle&& __value) noexcept : __handle_(std::move(__value)) {}
+ __basic_format_arg_value(float __value) noexcept : __float_(__value) {}
+ __basic_format_arg_value(double __value) noexcept : __double_(__value) {}
+ __basic_format_arg_value(long double __value) noexcept : __long_double_(__value) {}
+ __basic_format_arg_value(const _CharT* __value) noexcept : __const_char_type_ptr_(__value) {}
+ __basic_format_arg_value(basic_string_view<_CharT> __value) noexcept : __string_view_(__value) {}
+ __basic_format_arg_value(const void* __value) noexcept : __ptr_(__value) {}
+ __basic_format_arg_value(__handle&& __value) noexcept : __handle_(std::move(__value)) {}
};
template <class _Context>
@@ -281,16 +277,16 @@ class _LIBCPP_NO_SPECIALIZATIONS basic_format_arg {
public:
class handle;
- _LIBCPP_HIDE_FROM_ABI basic_format_arg() noexcept : __type_{__format::__arg_t::__none} {}
+ basic_format_arg() noexcept : __type_{__format::__arg_t::__none} {}
- _LIBCPP_HIDE_FROM_ABI explicit operator bool() const noexcept { return __type_ != __format::__arg_t::__none; }
+ explicit operator bool() const noexcept { return __type_ != __format::__arg_t::__none; }
# if _LIBCPP_STD_VER >= 26
// This function is user facing, so it must wrap the non-standard types of
// the "variant" in a handle to stay conforming. See __arg_t for more details.
template <class _Visitor>
- _LIBCPP_HIDE_FROM_ABI decltype(auto) visit(this basic_format_arg __arg, _Visitor&& __vis) {
+ decltype(auto) visit(this basic_format_arg __arg, _Visitor&& __vis) {
switch (__arg.__type_) {
# if _LIBCPP_HAS_INT128
case __format::__arg_t::__i128: {
@@ -311,7 +307,7 @@ class _LIBCPP_NO_SPECIALIZATIONS basic_format_arg {
// This function is user facing, so it must wrap the non-standard types of
// the "variant" in a handle to stay conforming. See __arg_t for more details.
template <class _Rp, class _Visitor>
- _LIBCPP_HIDE_FROM_ABI _Rp visit(this basic_format_arg __arg, _Visitor&& __vis) {
+ _Rp visit(this basic_format_arg __arg, _Visitor&& __vis) {
switch (__arg.__type_) {
# if _LIBCPP_HAS_INT128
case __format::__arg_t::__i128: {
@@ -349,20 +345,18 @@ class _LIBCPP_NO_SPECIALIZATIONS basic_format_arg {
__basic_format_arg_value<_Context> __value_;
__format::__arg_t __type_;
- _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(__format::__arg_t __type,
- __basic_format_arg_value<_Context> __value) noexcept
+ explicit basic_format_arg(__format::__arg_t __type, __basic_format_arg_value<_Context> __value) noexcept
: __value_(__value), __type_(__type) {}
};
template <class _Context>
class basic_format_arg<_Context>::handle {
public:
- _LIBCPP_HIDE_FROM_ABI void format(basic_format_parse_context<char_type>& __parse_ctx, _Context& __ctx) const {
+ void format(basic_format_parse_context<char_type>& __parse_ctx, _Context& __ctx) const {
__handle_.__format_(__parse_ctx, __ctx, __handle_.__ptr_);
}
- _LIBCPP_HIDE_FROM_ABI explicit handle(typename __basic_format_arg_value<_Context>::__handle& __handle) noexcept
- : __handle_(__handle) {}
+ explicit handle(typename __basic_format_arg_value<_Context>::__handle& __handle) noexcept : __handle_(__handle) {}
private:
typename __basic_format_arg_value<_Context>::__handle& __handle_;
@@ -371,8 +365,7 @@ class basic_format_arg<_Context>::handle {
// This function is user facing, so it must wrap the non-standard types of
// the "variant" in a handle to stay conforming. See __arg_t for more details.
template <class _Visitor, class _Context>
-_LIBCPP_DEPRECATED_IN_CXX26 _LIBCPP_HIDE_FROM_ABI decltype(auto)
-visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
+_LIBCPP_DEPRECATED_IN_CXX26 decltype(auto) visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
switch (__arg.__type_) {
# if _LIBCPP_HAS_INT128
case __format::__arg_t::__i128: {
diff --git a/libcxx/include/__format/format_arg_store.h b/libcxx/include/__format/format_arg_store.h
index 3f88161a5edd96..a182016469e069 100644
--- a/libcxx/include/__format/format_arg_store.h
+++ b/libcxx/include/__format/format_arg_store.h
@@ -169,7 +169,7 @@ consteval __arg_t __determine_arg_t() {
// Modeled after template<class T> explicit basic_format_arg(T& v) noexcept;
// [format.arg]/4-6
template <class _Context, class _Tp>
-_LIBCPP_HIDE_FROM_ABI basic_format_arg<_Context> __create_format_arg(_Tp& __value) noexcept {
+basic_format_arg<_Context> __create_format_arg(_Tp& __value) noexcept {
using _Dp = remove_const_t<_Tp>;
constexpr __arg_t __arg = __format::__determine_arg_t<_Context, _Dp>();
static_assert(__arg != __arg_t::__none, "the supplied type is not formattable");
@@ -216,8 +216,8 @@ _LIBCPP_HIDE_FROM_ABI basic_format_arg<_Context> __create_format_arg(_Tp& __valu
}
template <class _Context, class... _Args>
-_LIBCPP_HIDE_FROM_ABI void
-__create_packed_storage(uint64_t& __types, __basic_format_arg_value<_Context>* __values, _Args&... __args) noexcept {
+void __create_packed_storage(
+ uint64_t& __types, __basic_format_arg_value<_Context>* __values, _Args&... __args) noexcept {
int __shift = 0;
(
[&] {
@@ -234,7 +234,7 @@ __create_packed_storage(uint64_t& __types, __basic_format_arg_value<_Context>* _
}
template <class _Context, class... _Args>
-_LIBCPP_HIDE_FROM_ABI void __store_basic_format_arg(basic_format_arg<_Context>* __data, _Args&... __args) noexcept {
+void __store_basic_format_arg(basic_format_arg<_Context>* __data, _Args&... __args) noexcept {
([&] { *__data++ = __format::__create_format_arg<_Context>(__args); }(), ...);
}
@@ -258,7 +258,7 @@ struct __unpacked_format_arg_store {
template <class _Context, class... _Args>
struct __format_arg_store {
- _LIBCPP_HIDE_FROM_ABI __format_arg_store(_Args&... __args) noexcept {
+ __format_arg_store(_Args&... __args) noexcept {
if constexpr (sizeof...(_Args) != 0) {
if constexpr (__format::__use_packed_format_arg_store(sizeof...(_Args)))
__format::__create_packed_storage(__storage.__types_, __storage.__values_, __args...);
diff --git a/libcxx/include/__format/format_args.h b/libcxx/include/__format/format_args.h
index f1b648a10ac4f8..3efc2850c7e663 100644
--- a/libcxx/include/__format/format_args.h
+++ b/libcxx/include/__format/format_args.h
@@ -29,8 +29,7 @@ template <class _Context>
class basic_format_args {
public:
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI basic_format_args(const __format_arg_store<_Context, _Args...>& __store) noexcept
- : __size_(sizeof...(_Args)) {
+ basic_format_args(const __format_arg_store<_Context, _Args...>& __store) noexcept : __size_(sizeof...(_Args)) {
if constexpr (sizeof...(_Args) != 0) {
if constexpr (__format::__use_packed_format_arg_store(sizeof...(_Args))) {
__values_ = __store.__storage.__values_;
@@ -40,7 +39,7 @@ class basic_format_args {
}
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI basic_format_arg<_Context> get(size_t __id) const noexcept {
+ [[nodiscard]] basic_format_arg<_Context> get(size_t __id) const noexcept {
if (__id >= __size_)
return basic_format_arg<_Context>{};
@@ -50,7 +49,7 @@ class basic_format_args {
return __args_[__id];
}
- _LIBCPP_HIDE_FROM_ABI size_t __size() const noexcept { return __size_; }
+ size_t __size() const noexcept { return __size_; }
private:
size_t __size_{0};
diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h
index 09a45cac28c57d..9d56bd5c83c81a 100644
--- a/libcxx/include/__format/format_context.h
+++ b/libcxx/include/__format/format_context.h
@@ -49,7 +49,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
* This is needed since the constructor is private.
*/
template <class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI basic_format_context<_OutIt, _CharT>
+basic_format_context<_OutIt, _CharT>
__format_context_create(_OutIt __out_it,
basic_format_args<basic_format_context<_OutIt, _CharT>> __args,
optional<std::locale>&& __loc = nullopt) {
@@ -57,7 +57,7 @@ __format_context_create(_OutIt __out_it,
}
# else
template <class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI basic_format_context<_OutIt, _CharT>
+basic_format_context<_OutIt, _CharT>
__format_context_create(_OutIt __out_it, basic_format_args<basic_format_context<_OutIt, _CharT>> __args) {
return std::basic_format_context(std::move(__out_it), __args);
}
@@ -79,18 +79,16 @@ class _LIBCPP_PREFERRED_NAME(format_context) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_
static_assert(output_iterator<_OutIt, const _CharT&>, "[format.context]/p3 requires OutIt to be an output_iterator");
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI basic_format_arg<basic_format_context> arg(size_t __id) const noexcept {
- return __args_.get(__id);
- }
+ [[nodiscard]] basic_format_arg<basic_format_context> arg(size_t __id) const noexcept { return __args_.get(__id); }
# if _LIBCPP_HAS_LOCALIZATION
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI std::locale locale() {
+ [[nodiscard]] std::locale locale() {
if (!__loc_)
__loc_ = std::locale{};
return *__loc_;
}
# endif
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI iterator out() { return std::move(__out_it_); }
- _LIBCPP_HIDE_FROM_ABI void advance_to(iterator __it) { __out_it_ = std::move(__it); }
+ [[nodiscard]] iterator out() { return std::move(__out_it_); }
+ void advance_to(iterator __it) { __out_it_ = std::move(__it); }
private:
iterator __out_it_;
@@ -109,19 +107,19 @@ class _LIBCPP_PREFERRED_NAME(format_context) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_
optional<std::locale> __loc_;
template <class _OtherOutIt, class _OtherCharT>
- friend _LIBCPP_HIDE_FROM_ABI basic_format_context<_OtherOutIt, _OtherCharT> __format_context_create(
+ friend basic_format_context<_OtherOutIt, _OtherCharT> __format_context_create(
_OtherOutIt, basic_format_args<basic_format_context<_OtherOutIt, _OtherCharT>>, optional<std::locale>&&);
// Note: the Standard doesn't specify the required constructors.
- _LIBCPP_HIDE_FROM_ABI explicit basic_format_context(
+ explicit basic_format_context(
_OutIt __out_it, basic_format_args<basic_format_context> __args, optional<std::locale>&& __loc)
: __out_it_(std::move(__out_it)), __args_(__args), __loc_(std::move(__loc)) {}
# else
template <class _OtherOutIt, class _OtherCharT>
- friend _LIBCPP_HIDE_FROM_ABI basic_format_context<_OtherOutIt, _OtherCharT>
+ friend basic_format_context<_OtherOutIt, _OtherCharT>
__format_context_create(_OtherOutIt, basic_format_args<basic_format_context<_OtherOutIt, _OtherCharT>>);
- _LIBCPP_HIDE_FROM_ABI explicit basic_format_context(_OutIt __out_it, basic_format_args<basic_format_context> __args)
+ explicit basic_format_context(_OutIt __out_it, basic_format_args<basic_format_context> __args)
: __out_it_(std::move(__out_it)), __args_(__args) {}
# endif
@@ -155,7 +153,7 @@ class basic_format_context<typename __format::__retarget_buffer<_CharT>::__itera
using formatter_type = formatter<_Tp, _CharT>;
template <class _Context>
- _LIBCPP_HIDE_FROM_ABI explicit basic_format_context(iterator __out_it, _Context& __ctx)
+ explicit basic_format_context(iterator __out_it, _Context& __ctx)
: __out_it_(std::move(__out_it)),
# if _LIBCPP_HAS_LOCALIZATION
__loc_([](void* __c) { return static_cast<_Context*>(__c)->locale(); }),
@@ -184,14 +182,12 @@ class basic_format_context<typename __format::__retarget_buffer<_CharT>::__itera
}) {
}
- _LIBCPP_HIDE_FROM_ABI basic_format_arg<basic_format_context> arg(size_t __id) const noexcept {
- return __arg_(__ctx_, __id);
- }
+ basic_format_arg<basic_format_context> arg(size_t __id) const noexcept { return __arg_(__ctx_, __id); }
# if _LIBCPP_HAS_LOCALIZATION
- _LIBCPP_HIDE_FROM_ABI std::locale locale() { return __loc_(__ctx_); }
+ std::locale locale() { return __loc_(__ctx_); }
# endif
- _LIBCPP_HIDE_FROM_ABI iterator out() { return std::move(__out_it_); }
- _LIBCPP_HIDE_FROM_ABI void advance_to(iterator __it) { __out_it_ = std::move(__it); }
+ iterator out() { return std::move(__out_it_); }
+ void advance_to(iterator __it) { __out_it_ = std::move(__it); }
private:
iterator __out_it_;
diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h
index 8f214a493a49ec..5544867ee5a8d4 100644
--- a/libcxx/include/__format/format_functions.h
+++ b/libcxx/include/__format/format_functions.h
@@ -69,13 +69,13 @@ using wformat_args = basic_format_args<wformat_context>;
# endif
template <class _Context = format_context, class... _Args>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI __format_arg_store<_Context, _Args...> make_format_args(_Args&... __args) {
+[[nodiscard]] __format_arg_store<_Context, _Args...> make_format_args(_Args&... __args) {
return std::__format_arg_store<_Context, _Args...>(__args...);
}
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI __format_arg_store<wformat_context, _Args...> make_wformat_args(_Args&... __args) {
+[[nodiscard]] __format_arg_store<wformat_context, _Args...> make_wformat_args(_Args&... __args) {
return std::__format_arg_store<wformat_context, _Args...>(__args...);
}
# endif
@@ -90,12 +90,12 @@ template <class _CharT>
class __compile_time_handle {
public:
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr void __parse(_ParseContext& __ctx) const {
+ constexpr void __parse(_ParseContext& __ctx) const {
__parse_(__ctx);
}
template <class _Tp>
- _LIBCPP_HIDE_FROM_ABI constexpr void __enable() {
+ constexpr void __enable() {
__parse_ = [](basic_format_parse_context<_CharT>& __ctx) {
formatter<_Tp, _CharT> __f;
__ctx.advance_to(__f.parse(__ctx));
@@ -104,7 +104,7 @@ class __compile_time_handle {
// Before calling __parse the proper handler needs to be set with __enable.
// The default handler isn't a core constant expression.
- _LIBCPP_HIDE_FROM_ABI constexpr __compile_time_handle()
+ constexpr __compile_time_handle()
: __parse_([](basic_format_parse_context<_CharT>&) { std::__throw_format_error("Not a handle"); }) {}
private:
@@ -118,32 +118,32 @@ struct __compile_time_basic_format_context {
public:
using char_type = _CharT;
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __compile_time_basic_format_context(
+ constexpr explicit __compile_time_basic_format_context(
const __arg_t* __args, const __compile_time_handle<_CharT>* __handles, size_t __size)
: __args_(__args), __handles_(__handles), __size_(__size) {}
// During the compile-time validation nothing needs to be written.
// Therefore all operations of this iterator are a NOP.
struct iterator {
- _LIBCPP_HIDE_FROM_ABI constexpr iterator& operator=(_CharT) { return *this; }
- _LIBCPP_HIDE_FROM_ABI constexpr iterator& operator*() { return *this; }
- _LIBCPP_HIDE_FROM_ABI constexpr iterator operator++(int) { return *this; }
+ constexpr iterator& operator=(_CharT) { return *this; }
+ constexpr iterator& operator*() { return *this; }
+ constexpr iterator operator++(int) { return *this; }
};
- _LIBCPP_HIDE_FROM_ABI constexpr __arg_t arg(size_t __id) const {
+ constexpr __arg_t arg(size_t __id) const {
if (__id >= __size_)
std::__throw_format_error("The argument index value is too large for the number of arguments supplied");
return __args_[__id];
}
- _LIBCPP_HIDE_FROM_ABI constexpr const __compile_time_handle<_CharT>& __handle(size_t __id) const {
+ constexpr const __compile_time_handle<_CharT>& __handle(size_t __id) const {
if (__id >= __size_)
std::__throw_format_error("The argument index value is too large for the number of arguments supplied");
return __handles_[__id];
}
- _LIBCPP_HIDE_FROM_ABI constexpr iterator out() { return {}; }
- _LIBCPP_HIDE_FROM_ABI constexpr void advance_to(iterator) {}
+ constexpr iterator out() { return {}; }
+ constexpr void advance_to(iterator) {}
private:
const __arg_t* __args_;
@@ -160,8 +160,8 @@ struct __compile_time_basic_format_context {
//
// _HasPrecision does the formatter have a precision?
template <class _CharT, class _Tp, bool _HasPrecision = false>
-_LIBCPP_HIDE_FROM_ABI constexpr void __compile_time_validate_argument(
- basic_format_parse_context<_CharT>& __parse_ctx, __compile_time_basic_format_context<_CharT>& __ctx) {
+constexpr void __compile_time_validate_argument(basic_format_parse_context<_CharT>& __parse_ctx,
+ __compile_time_basic_format_context<_CharT>& __ctx) {
auto __validate_type = [](__arg_t __type) {
// LWG3720 originally allowed "signed or unsigned integer types", however
// the final version explicitly changed it to "*standard* signed or unsigned
@@ -193,7 +193,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __compile_time_validate_argument(
// This function is not user facing, so it can directly use the non-standard types of the "variant".
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __compile_time_visit_format_arg(
+constexpr void __compile_time_visit_format_arg(
basic_format_parse_context<_CharT>& __parse_ctx,
__compile_time_basic_format_context<_CharT>& __ctx,
__arg_t __type) {
@@ -245,7 +245,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __compile_time_visit_format_arg(
}
template <contiguous_iterator _Iterator, class _ParseCtx, class _Ctx>
-_LIBCPP_HIDE_FROM_ABI constexpr _Iterator
+constexpr _Iterator
__handle_replacement_field(_Iterator __begin, _Iterator __end, _ParseCtx& __parse_ctx, _Ctx& __ctx) {
using _CharT = iter_value_t<_Iterator>;
__format::__parse_number_result __r = __format::__parse_arg_id(__begin, __end, __parse_ctx);
@@ -299,7 +299,7 @@ __handle_replacement_field(_Iterator __begin, _Iterator __end, _ParseCtx& __pars
}
template <class _ParseCtx, class _Ctx>
-_LIBCPP_HIDE_FROM_ABI constexpr typename _Ctx::iterator __vformat_to(_ParseCtx&& __parse_ctx, _Ctx&& __ctx) {
+constexpr typename _Ctx::iterator __vformat_to(_ParseCtx&& __parse_ctx, _Ctx&& __ctx) {
using _CharT = typename _ParseCtx::char_type;
static_assert(same_as<typename _Ctx::char_type, _CharT>);
@@ -351,17 +351,15 @@ struct __dynamic_format_string {
friend struct basic_format_string;
public:
- _LIBCPP_HIDE_FROM_ABI __dynamic_format_string(basic_string_view<_CharT> __s) noexcept : __str_(__s) {}
+ __dynamic_format_string(basic_string_view<_CharT> __s) noexcept : __str_(__s) {}
__dynamic_format_string(const __dynamic_format_string&) = delete;
__dynamic_format_string& operator=(const __dynamic_format_string&) = delete;
};
-_LIBCPP_HIDE_FROM_ABI inline __dynamic_format_string<char> dynamic_format(string_view __fmt) noexcept { return __fmt; }
+inline __dynamic_format_string<char> dynamic_format(string_view __fmt) noexcept { return __fmt; }
# if _LIBCPP_HAS_WIDE_CHARACTERS
-_LIBCPP_HIDE_FROM_ABI inline __dynamic_format_string<wchar_t> dynamic_format(wstring_view __fmt) noexcept {
- return __fmt;
-}
+inline __dynamic_format_string<wchar_t> dynamic_format(wstring_view __fmt) noexcept { return __fmt; }
# endif
# endif // _LIBCPP_STD_VER >= 26
@@ -374,9 +372,9 @@ struct basic_format_string {
_Context{__types_.data(), __handles_.data(), sizeof...(_Args)});
}
- _LIBCPP_HIDE_FROM_ABI constexpr basic_string_view<_CharT> get() const noexcept { return __str_; }
+ constexpr basic_string_view<_CharT> get() const noexcept { return __str_; }
# if _LIBCPP_STD_VER >= 26
- _LIBCPP_HIDE_FROM_ABI basic_format_string(__dynamic_format_string<_CharT> __s) noexcept : __str_(__s.__str_) {}
+ basic_format_string(__dynamic_format_string<_CharT> __s) noexcept : __str_(__s.__str_) {}
# endif
private:
@@ -407,9 +405,9 @@ using wformat_string = basic_format_string<wchar_t, type_identity_t<_Args>...>;
template <class _OutIt, class _CharT, class _FormatOutIt>
requires(output_iterator<_OutIt, const _CharT&>)
-_LIBCPP_HIDE_FROM_ABI _OutIt __vformat_to(_OutIt __out_it,
- basic_string_view<_CharT> __fmt,
- basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
+_OutIt __vformat_to(_OutIt __out_it,
+ basic_string_view<_CharT> __fmt,
+ basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
if constexpr (same_as<_OutIt, _FormatOutIt>)
return std::__format::__vformat_to(
basic_format_parse_context{__fmt, __args.__size()}, std::__format_context_create(std::move(__out_it), __args));
@@ -425,28 +423,25 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __vformat_to(_OutIt __out_it,
// https://reviews.llvm.org/D110499#inline-1180704
// TODO FMT Evaluate whether we want to file a Clang bug report regarding this.
template <output_iterator<const char&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt vformat_to(_OutIt __out_it, string_view __fmt, format_args __args) {
+_LIBCPP_ALWAYS_INLINE _OutIt vformat_to(_OutIt __out_it, string_view __fmt, format_args __args) {
return std::__vformat_to(std::move(__out_it), __fmt, __args);
}
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
-vformat_to(_OutIt __out_it, wstring_view __fmt, wformat_args __args) {
+_LIBCPP_ALWAYS_INLINE _OutIt vformat_to(_OutIt __out_it, wstring_view __fmt, wformat_args __args) {
return std::__vformat_to(std::move(__out_it), __fmt, __args);
}
# endif
template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
-format_to(_OutIt __out_it, format_string<_Args...> __fmt, _Args&&... __args) {
+_LIBCPP_ALWAYS_INLINE _OutIt format_to(_OutIt __out_it, format_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat_to(std::move(__out_it), __fmt.get(), std::make_format_args(__args...));
}
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
-format_to(_OutIt __out_it, wformat_string<_Args...> __fmt, _Args&&... __args) {
+_LIBCPP_ALWAYS_INLINE _OutIt format_to(_OutIt __out_it, wformat_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat_to(std::move(__out_it), __fmt.get(), std::make_wformat_args(__args...));
}
# endif
@@ -456,7 +451,7 @@ format_to(_OutIt __out_it, wformat_string<_Args...> __fmt, _Args&&... __args) {
// constant folding is successful, the formatting is performed and the resulting string is returned.
namespace __format {
template <class _CharT>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI optional<basic_string<_CharT>> __try_constant_folding(
+[[nodiscard]] optional<basic_string<_CharT>> __try_constant_folding(
basic_string_view<_CharT> __fmt,
basic_format_args<basic_format_context<back_insert_iterator<__format::__output_buffer<_CharT>>, _CharT>> __args) {
// Fold strings not containing '{' or '}' to just return the string
@@ -492,7 +487,7 @@ template <class _CharT>
// TODO FMT This needs to be a template or std::to_chars(floating-point) availability markup
// fires too eagerly, see http://llvm.org/PR61563.
template <class = void>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI string vformat(string_view __fmt, format_args __args) {
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE inline string vformat(string_view __fmt, format_args __args) {
auto __result = __format::__try_constant_folding(__fmt, __args);
if (__result.has_value())
return *std::move(__result);
@@ -505,8 +500,7 @@ template <class = void>
// TODO FMT This needs to be a template or std::to_chars(floating-point) availability markup
// fires too eagerly, see http://llvm.org/PR61563.
template <class = void>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI wstring
-vformat(wstring_view __fmt, wformat_args __args) {
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE inline wstring vformat(wstring_view __fmt, wformat_args __args) {
auto __result = __format::__try_constant_folding(__fmt, __args);
if (__result.has_value())
return *std::move(__result);
@@ -517,21 +511,19 @@ vformat(wstring_view __fmt, wformat_args __args) {
# endif
template <class... _Args>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI string
-format(format_string<_Args...> __fmt, _Args&&... __args) {
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE string format(format_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat(__fmt.get(), std::make_format_args(__args...));
}
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI wstring
-format(wformat_string<_Args...> __fmt, _Args&&... __args) {
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE wstring format(wformat_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat(__fmt.get(), std::make_wformat_args(__args...));
}
# endif
template <class _Context, class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt>
+format_to_n_result<_OutIt>
__vformat_to_n(_OutIt __out_it,
iter_difference_t<_OutIt> __n,
basic_string_view<_CharT> __fmt,
@@ -543,21 +535,21 @@ __vformat_to_n(_OutIt __out_it,
}
template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt>
+_LIBCPP_ALWAYS_INLINE format_to_n_result<_OutIt>
format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, format_string<_Args...> __fmt, _Args&&... __args) {
return std::__vformat_to_n<format_context>(std::move(__out_it), __n, __fmt.get(), std::make_format_args(__args...));
}
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt>
+format_to_n_result<_OutIt>
format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, wformat_string<_Args...> __fmt, _Args&&... __args) {
return std::__vformat_to_n<wformat_context>(std::move(__out_it), __n, __fmt.get(), std::make_wformat_args(__args...));
}
# endif
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(basic_string_view<_CharT> __fmt, auto __args) {
+size_t __vformatted_size(basic_string_view<_CharT> __fmt, auto __args) {
__format::__formatted_size_buffer<_CharT> __buffer;
std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
std::__format_context_create(__buffer.__make_output_iterator(), __args));
@@ -565,15 +557,13 @@ _LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(basic_string_view<_CharT> __fmt,
}
template <class... _Args>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI size_t
-formatted_size(format_string<_Args...> __fmt, _Args&&... __args) {
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE size_t formatted_size(format_string<_Args...> __fmt, _Args&&... __args) {
return std::__vformatted_size(__fmt.get(), basic_format_args{std::make_format_args(__args...)});
}
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI size_t
-formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) {
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE size_t formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) {
return std::__vformatted_size(__fmt.get(), basic_format_args{std::make_wformat_args(__args...)});
}
# endif
@@ -582,11 +572,10 @@ formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) {
template <class _OutIt, class _CharT, class _FormatOutIt>
requires(output_iterator<_OutIt, const _CharT&>)
-_LIBCPP_HIDE_FROM_ABI _OutIt __vformat_to(
- _OutIt __out_it,
- locale __loc,
- basic_string_view<_CharT> __fmt,
- basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
+_OutIt __vformat_to(_OutIt __out_it,
+ locale __loc,
+ basic_string_view<_CharT> __fmt,
+ basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
if constexpr (same_as<_OutIt, _FormatOutIt>)
return std::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
std::__format_context_create(std::move(__out_it), __args, std::move(__loc)));
@@ -600,29 +589,27 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __vformat_to(
}
template <output_iterator<const char&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
-vformat_to(_OutIt __out_it, locale __loc, string_view __fmt, format_args __args) {
+_LIBCPP_ALWAYS_INLINE _OutIt vformat_to(_OutIt __out_it, locale __loc, string_view __fmt, format_args __args) {
return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt, __args);
}
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
-vformat_to(_OutIt __out_it, locale __loc, wstring_view __fmt, wformat_args __args) {
+_LIBCPP_ALWAYS_INLINE _OutIt vformat_to(_OutIt __out_it, locale __loc, wstring_view __fmt, wformat_args __args) {
return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt, __args);
}
# endif
template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
-format_to(_OutIt __out_it, locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
+_LIBCPP_ALWAYS_INLINE
+_OutIt format_to(_OutIt __out_it, locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt.get(), std::make_format_args(__args...));
}
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _OutIt
-format_to(_OutIt __out_it, locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
+_LIBCPP_ALWAYS_INLINE
+_OutIt format_to(_OutIt __out_it, locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt.get(), std::make_wformat_args(__args...));
}
# endif
@@ -630,8 +617,7 @@ format_to(_OutIt __out_it, locale __loc, wformat_string<_Args...> __fmt, _Args&&
// TODO FMT This needs to be a template or std::to_chars(floating-point) availability markup
// fires too eagerly, see http://llvm.org/PR61563.
template <class = void>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI string
-vformat(locale __loc, string_view __fmt, format_args __args) {
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE inline string vformat(locale __loc, string_view __fmt, format_args __args) {
__format::__allocating_buffer<char> __buffer;
std::vformat_to(__buffer.__make_output_iterator(), std::move(__loc), __fmt, __args);
return string{__buffer.__view()};
@@ -641,8 +627,7 @@ vformat(locale __loc, string_view __fmt, format_args __args) {
// TODO FMT This needs to be a template or std::to_chars(floating-point) availability markup
// fires too eagerly, see http://llvm.org/PR61563.
template <class = void>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI wstring
-vformat(locale __loc, wstring_view __fmt, wformat_args __args) {
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE inline wstring vformat(locale __loc, wstring_view __fmt, wformat_args __args) {
__format::__allocating_buffer<wchar_t> __buffer;
std::vformat_to(__buffer.__make_output_iterator(), std::move(__loc), __fmt, __args);
return wstring{__buffer.__view()};
@@ -650,21 +635,19 @@ vformat(locale __loc, wstring_view __fmt, wformat_args __args) {
# endif
template <class... _Args>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI string
-format(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE string format(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat(std::move(__loc), __fmt.get(), std::make_format_args(__args...));
}
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI wstring
-format(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE wstring format(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
return std::vformat(std::move(__loc), __fmt.get(), std::make_wformat_args(__args...));
}
# endif
template <class _Context, class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(
+format_to_n_result<_OutIt> __vformat_to_n(
_OutIt __out_it,
iter_difference_t<_OutIt> __n,
locale __loc,
@@ -678,7 +661,7 @@ _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(
}
template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> format_to_n(
+_LIBCPP_ALWAYS_INLINE format_to_n_result<_OutIt> format_to_n(
_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
return std::__vformat_to_n<format_context>(
std::move(__out_it), __n, std::move(__loc), __fmt.get(), std::make_format_args(__args...));
@@ -686,7 +669,7 @@ _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> format_to
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> format_to_n(
+_LIBCPP_ALWAYS_INLINE format_to_n_result<_OutIt> format_to_n(
_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
return std::__vformat_to_n<wformat_context>(
std::move(__out_it), __n, std::move(__loc), __fmt.get(), std::make_wformat_args(__args...));
@@ -694,7 +677,7 @@ _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> format_to
# endif
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(locale __loc, basic_string_view<_CharT> __fmt, auto __args) {
+size_t __vformatted_size(locale __loc, basic_string_view<_CharT> __fmt, auto __args) {
__format::__formatted_size_buffer<_CharT> __buffer;
std::__format::__vformat_to(
basic_format_parse_context{__fmt, __args.__size()},
@@ -703,15 +686,15 @@ _LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(locale __loc, basic_string_view<_
}
template <class... _Args>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI size_t
+[[nodiscard]] _LIBCPP_ALWAYS_INLINE size_t
formatted_size(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
return std::__vformatted_size(std::move(__loc), __fmt.get(), basic_format_args{std::make_format_args(__args...)});
}
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <class... _Args>
-[[nodiscard]] _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI size_t
-formatted_size(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
+[[nodiscard]]
+_LIBCPP_ALWAYS_INLINE size_t formatted_size(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
return std::__vformatted_size(std::move(__loc), __fmt.get(), basic_format_args{std::make_wformat_args(__args...)});
}
# endif
diff --git a/libcxx/include/__format/format_parse_context.h b/libcxx/include/__format/format_parse_context.h
index 2eda9d7f1f972a..5f097ae52e23dd 100644
--- a/libcxx/include/__format/format_parse_context.h
+++ b/libcxx/include/__format/format_parse_context.h
@@ -30,8 +30,7 @@ class basic_format_parse_context {
using const_iterator = typename basic_string_view<_CharT>::const_iterator;
using iterator = const_iterator;
- _LIBCPP_HIDE_FROM_ABI constexpr explicit basic_format_parse_context(
- basic_string_view<_CharT> __fmt, size_t __num_args = 0) noexcept
+ constexpr explicit basic_format_parse_context(basic_string_view<_CharT> __fmt, size_t __num_args = 0) noexcept
: __begin_(__fmt.begin()),
__end_(__fmt.end()),
__indexing_(__unknown),
@@ -41,11 +40,11 @@ class basic_format_parse_context {
basic_format_parse_context(const basic_format_parse_context&) = delete;
basic_format_parse_context& operator=(const basic_format_parse_context&) = delete;
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const_iterator begin() const noexcept { return __begin_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const_iterator end() const noexcept { return __end_; }
- _LIBCPP_HIDE_FROM_ABI constexpr void advance_to(const_iterator __it) { __begin_ = __it; }
+ [[nodiscard]] constexpr const_iterator begin() const noexcept { return __begin_; }
+ [[nodiscard]] constexpr const_iterator end() const noexcept { return __end_; }
+ constexpr void advance_to(const_iterator __it) { __begin_ = __it; }
- _LIBCPP_HIDE_FROM_ABI constexpr size_t next_arg_id() {
+ constexpr size_t next_arg_id() {
if (__indexing_ == __manual)
std::__throw_format_error("Using automatic argument numbering in manual argument numbering mode");
@@ -65,7 +64,7 @@ class basic_format_parse_context {
return __next_arg_id_++;
}
- _LIBCPP_HIDE_FROM_ABI constexpr void check_arg_id(size_t __id) {
+ constexpr void check_arg_id(size_t __id) {
if (__indexing_ == __automatic)
std::__throw_format_error("Using manual argument numbering in automatic argument numbering mode");
diff --git a/libcxx/include/__format/format_string.h b/libcxx/include/__format/format_string.h
index b60ed4db382eac..7f246cab5e283f 100644
--- a/libcxx/include/__format/format_string.h
+++ b/libcxx/include/__format/format_string.h
@@ -38,7 +38,7 @@ template <contiguous_iterator _Iterator>
__parse_number_result(_Iterator, uint32_t) -> __parse_number_result<_Iterator>;
template <contiguous_iterator _Iterator>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator> __parse_number(_Iterator __begin, _Iterator __end);
+constexpr __parse_number_result<_Iterator> __parse_number(_Iterator __begin, _Iterator __end);
/**
* The maximum value of a numeric argument.
@@ -55,15 +55,13 @@ inline constexpr uint32_t __number_max = INT32_MAX;
namespace __detail {
template <contiguous_iterator _Iterator>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
-__parse_zero(_Iterator __begin, _Iterator, auto& __parse_ctx) {
+constexpr __parse_number_result<_Iterator> __parse_zero(_Iterator __begin, _Iterator, auto& __parse_ctx) {
__parse_ctx.check_arg_id(0);
return {++__begin, 0}; // can never be larger than the maximum.
}
template <contiguous_iterator _Iterator>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
-__parse_automatic(_Iterator __begin, _Iterator, auto& __parse_ctx) {
+constexpr __parse_number_result<_Iterator> __parse_automatic(_Iterator __begin, _Iterator, auto& __parse_ctx) {
size_t __value = __parse_ctx.next_arg_id();
_LIBCPP_ASSERT_UNCATEGORIZED(__value <= __number_max, "Compilers don't support this number of arguments");
@@ -71,8 +69,7 @@ __parse_automatic(_Iterator __begin, _Iterator, auto& __parse_ctx) {
}
template <contiguous_iterator _Iterator>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
-__parse_manual(_Iterator __begin, _Iterator __end, auto& __parse_ctx) {
+constexpr __parse_number_result<_Iterator> __parse_manual(_Iterator __begin, _Iterator __end, auto& __parse_ctx) {
__parse_number_result<_Iterator> __r = __format::__parse_number(__begin, __end);
__parse_ctx.check_arg_id(__r.__value);
return __r;
@@ -87,8 +84,7 @@ __parse_manual(_Iterator __begin, _Iterator __end, auto& __parse_ctx) {
* allows a maximum value of 2147483647.
*/
template <contiguous_iterator _Iterator>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
-__parse_number(_Iterator __begin, _Iterator __end_input) {
+constexpr __parse_number_result<_Iterator> __parse_number(_Iterator __begin, _Iterator __end_input) {
using _CharT = iter_value_t<_Iterator>;
static_assert(__format::__number_max == INT32_MAX, "The algorithm is implemented based on this value.");
/*
@@ -131,8 +127,7 @@ __parse_number(_Iterator __begin, _Iterator __end_input) {
* should be the closing '}' of the arg-id.
*/
template <contiguous_iterator _Iterator>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_Iterator>
-__parse_arg_id(_Iterator __begin, _Iterator __end, auto& __parse_ctx) {
+constexpr __parse_number_result<_Iterator> __parse_arg_id(_Iterator __begin, _Iterator __end, auto& __parse_ctx) {
using _CharT = iter_value_t<_Iterator>;
switch (*__begin) {
case _CharT('0'):
diff --git a/libcxx/include/__format/formatter.h b/libcxx/include/__format/formatter.h
index cbbd9d4f7c6abe..e501e8a1d0c79b 100644
--- a/libcxx/include/__format/formatter.h
+++ b/libcxx/include/__format/formatter.h
@@ -45,7 +45,7 @@ template <class _Tp>
constexpr bool enable_nonlocking_formatter_optimization = false;
template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr void __set_debug_format(_Tp& __formatter) {
+constexpr void __set_debug_format(_Tp& __formatter) {
if constexpr (requires { __formatter.set_debug_format(); })
__formatter.set_debug_format();
}
diff --git a/libcxx/include/__format/formatter_bool.h b/libcxx/include/__format/formatter_bool.h
index 139917c1e29e53..bdbdaeafb01cd2 100644
--- a/libcxx/include/__format/formatter_bool.h
+++ b/libcxx/include/__format/formatter_bool.h
@@ -24,22 +24,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <__fmt_char_type _CharT, class _ParseContext>
-_LIBCPP_HIDE_FROM_ABI constexpr
+constexpr
typename _ParseContext::iterator __formatter_bool_parse(__format_spec::__parser_data<_CharT>&, _ParseContext&);
template <__fmt_char_type _CharT, class _FormatContext>
-_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
+typename _FormatContext::iterator
__formatter_bool_format(bool __value, __format_spec::__parser_data<_CharT>, _FormatContext&);
template <__fmt_char_type _CharT>
struct formatter<bool, _CharT> {
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
return std::__formatter_bool_parse(__parser_, __ctx);
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(bool __value, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(bool __value, _FormatContext& __ctx) const {
return std::__formatter_bool_format(__value, __parser_, __ctx);
}
diff --git a/libcxx/include/__format/formatter_bool_impl.h b/libcxx/include/__format/formatter_bool_impl.h
index 477ef39feedd6e..09d2f00b084166 100644
--- a/libcxx/include/__format/formatter_bool_impl.h
+++ b/libcxx/include/__format/formatter_bool_impl.h
@@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// required to provide in other headers where we need formatter<bool> itself to be complete.
template <__fmt_char_type _CharT, class _ParseContext>
-_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator
+constexpr typename _ParseContext::iterator
__formatter_bool_parse(__format_spec::__parser_data<_CharT>& __parser_data, _ParseContext& __ctx) {
__format_spec::__parser<_CharT> __parser(__parser_data);
@@ -41,7 +41,7 @@ __formatter_bool_parse(__format_spec::__parser_data<_CharT>& __parser_data, _Par
}
template <__fmt_char_type _CharT, class _FormatContext>
-_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
+typename _FormatContext::iterator
__formatter_bool_format(bool __value, __format_spec::__parser_data<_CharT> __parser_data, _FormatContext& __ctx) {
__format_spec::__parser<_CharT> __parser(__parser_data);
diff --git a/libcxx/include/__format/formatter_char.h b/libcxx/include/__format/formatter_char.h
index 919c5b7b9f9f94..8da79bd538d59a 100644
--- a/libcxx/include/__format/formatter_char.h
+++ b/libcxx/include/__format/formatter_char.h
@@ -34,14 +34,14 @@ template <__fmt_char_type _CharT>
struct __formatter_char {
public:
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
typename _ParseContext::iterator __result = __parser_.__parse(__ctx, __format_spec::__fields_integral);
__format_spec::__process_parsed_char(__parser_, "a character");
return __result;
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(_CharT __value, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(_CharT __value, _FormatContext& __ctx) const {
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));
@@ -61,14 +61,14 @@ struct __formatter_char {
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(char __value, _FormatContext& __ctx) const
+ typename _FormatContext::iterator format(char __value, _FormatContext& __ctx) const
requires(same_as<_CharT, wchar_t>)
{
return format(static_cast<wchar_t>(static_cast<unsigned char>(__value)), __ctx);
}
# if _LIBCPP_STD_VER >= 23
- _LIBCPP_HIDE_FROM_ABI constexpr void set_debug_format() { __parser_.__type_ = __format_spec::__type::__debug; }
+ constexpr void set_debug_format() { __parser_.__type_ = __format_spec::__type::__debug; }
# endif
__format_spec::__parser<_CharT> __parser_;
diff --git a/libcxx/include/__format/formatter_floating_point.h b/libcxx/include/__format/formatter_floating_point.h
index 44e352a9687cc2..5f0c9fabc184e8 100644
--- a/libcxx/include/__format/formatter_floating_point.h
+++ b/libcxx/include/__format/formatter_floating_point.h
@@ -58,21 +58,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace __formatter {
template <floating_point _Tp>
-_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value) {
+char* __to_buffer(char* __first, char* __last, _Tp __value) {
to_chars_result __r = std::to_chars(__first, __last, __value);
_LIBCPP_ASSERT_INTERNAL(__r.ec == errc(0), "Internal buffer too small");
return __r.ptr;
}
template <floating_point _Tp>
-_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, chars_format __fmt) {
+char* __to_buffer(char* __first, char* __last, _Tp __value, chars_format __fmt) {
to_chars_result __r = std::to_chars(__first, __last, __value, __fmt);
_LIBCPP_ASSERT_INTERNAL(__r.ec == errc(0), "Internal buffer too small");
return __r.ptr;
}
template <floating_point _Tp>
-_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, chars_format __fmt, int __precision) {
+char* __to_buffer(char* __first, char* __last, _Tp __value, chars_format __fmt, int __precision) {
to_chars_result __r = std::to_chars(__first, __last, __value, __fmt, __precision);
_LIBCPP_ASSERT_INTERNAL(__r.ec == errc(0), "Internal buffer too small");
return __r.ptr;
@@ -112,7 +112,7 @@ template <class _Tp>
struct __traits;
template <floating_point _Fp>
-_LIBCPP_HIDE_FROM_ABI constexpr size_t __float_buffer_size(int __precision) {
+constexpr size_t __float_buffer_size(int __precision) {
using _Traits = __traits<_Fp>;
return 4 + _Traits::__max_integral + __precision + _Traits::__max_fractional_value;
}
@@ -154,8 +154,7 @@ class __float_buffer {
// When supporting long doubles the __max_integral part becomes 4932 which
// may be too much for some platforms. For these cases a better estimate is
// required.
- explicit _LIBCPP_HIDE_FROM_ABI __float_buffer(int __precision)
- : __precision_(__precision != -1 ? __precision : _Traits::__max_fractional) {
+ explicit __float_buffer(int __precision) : __precision_(__precision != -1 ? __precision : _Traits::__max_fractional) {
// When the precision is larger than _Traits::__max_fractional the digits in
// the range (_Traits::__max_fractional, precision] will contain the value
// zero. There's no need to request to_chars to write these zeros:
@@ -178,20 +177,20 @@ class __float_buffer {
__begin_ = __buffer_;
}
- _LIBCPP_HIDE_FROM_ABI ~__float_buffer() {
+ ~__float_buffer() {
if (__size_ > _Traits::__stack_buffer_size)
allocator<char>{}.deallocate(__begin_, __size_);
}
- _LIBCPP_HIDE_FROM_ABI __float_buffer(const __float_buffer&) = delete;
- _LIBCPP_HIDE_FROM_ABI __float_buffer& operator=(const __float_buffer&) = delete;
+ __float_buffer(const __float_buffer&) = delete;
+ __float_buffer& operator=(const __float_buffer&) = delete;
- _LIBCPP_HIDE_FROM_ABI char* begin() const { return __begin_; }
- _LIBCPP_HIDE_FROM_ABI char* end() const { return __begin_ + __size_; }
+ char* begin() const { return __begin_; }
+ char* end() const { return __begin_ + __size_; }
- _LIBCPP_HIDE_FROM_ABI int __precision() const { return __precision_; }
- _LIBCPP_HIDE_FROM_ABI int __num_trailing_zeros() const { return __num_trailing_zeros_; }
- _LIBCPP_HIDE_FROM_ABI void __remove_trailing_zeros() { __num_trailing_zeros_ = 0; }
- _LIBCPP_HIDE_FROM_ABI void __add_trailing_zeros(int __zeros) { __num_trailing_zeros_ += __zeros; }
+ int __precision() const { return __precision_; }
+ int __num_trailing_zeros() const { return __num_trailing_zeros_; }
+ void __remove_trailing_zeros() { __num_trailing_zeros_ = 0; }
+ void __add_trailing_zeros(int __zeros) { __num_trailing_zeros_ += __zeros; }
private:
int __precision_;
@@ -223,7 +222,7 @@ struct __float_result {
/// eSdd and eSdddd (S = sign, d = digit)
///
/// \returns a pointer to the exponent or __last when not found.
-constexpr inline _LIBCPP_HIDE_FROM_ABI char* __find_exponent(char* __first, char* __last) {
+constexpr inline char* __find_exponent(char* __first, char* __last) {
ptrdiff_t __size = __last - __first;
if (__size >= 4) {
__first = __last - std::min(__size, ptrdiff_t(6));
@@ -236,8 +235,7 @@ constexpr inline _LIBCPP_HIDE_FROM_ABI char* __find_exponent(char* __first, char
}
template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result
-__format_buffer_default(const __float_buffer<_Fp>& __buffer, _Tp __value, char* __integral) {
+__float_result __format_buffer_default(const __float_buffer<_Fp>& __buffer, _Tp __value, char* __integral) {
__float_result __result;
__result.__integral = __integral;
__result.__last = __formatter::__to_buffer(__integral, __buffer.end(), __value);
@@ -265,7 +263,7 @@ __format_buffer_default(const __float_buffer<_Fp>& __buffer, _Tp __value, char*
}
template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_lower_case(
+__float_result __format_buffer_hexadecimal_lower_case(
const __float_buffer<_Fp>& __buffer, _Tp __value, int __precision, char* __integral) {
__float_result __result;
__result.__integral = __integral;
@@ -317,7 +315,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_lower_case(
}
template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_upper_case(
+__float_result __format_buffer_hexadecimal_upper_case(
const __float_buffer<_Fp>& __buffer, _Tp __value, int __precision, char* __integral) {
__float_result __result =
__formatter::__format_buffer_hexadecimal_lower_case(__buffer, __value, __precision, __integral);
@@ -327,7 +325,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_upper_case(
}
template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_scientific_lower_case(
+__float_result __format_buffer_scientific_lower_case(
const __float_buffer<_Fp>& __buffer, _Tp __value, int __precision, char* __integral) {
__float_result __result;
__result.__integral = __integral;
@@ -354,7 +352,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_scientific_lower_case(
}
template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_scientific_upper_case(
+__float_result __format_buffer_scientific_upper_case(
const __float_buffer<_Fp>& __buffer, _Tp __value, int __precision, char* __integral) {
__float_result __result =
__formatter::__format_buffer_scientific_lower_case(__buffer, __value, __precision, __integral);
@@ -363,7 +361,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_scientific_upper_case(
}
template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result
+__float_result
__format_buffer_fixed(const __float_buffer<_Fp>& __buffer, _Tp __value, int __precision, char* __integral) {
__float_result __result;
__result.__integral = __integral;
@@ -386,7 +384,7 @@ __format_buffer_fixed(const __float_buffer<_Fp>& __buffer, _Tp __value, int __pr
}
template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result
+__float_result
__format_buffer_general_lower_case(__float_buffer<_Fp>& __buffer, _Tp __value, int __precision, char* __integral) {
__buffer.__remove_trailing_zeros();
@@ -423,7 +421,7 @@ __format_buffer_general_lower_case(__float_buffer<_Fp>& __buffer, _Tp __value, i
}
template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result
+__float_result
__format_buffer_general_upper_case(__float_buffer<_Fp>& __buffer, _Tp __value, int __precision, char* __integral) {
__float_result __result = __formatter::__format_buffer_general_lower_case(__buffer, __value, __precision, __integral);
if (__result.__exponent != __result.__last)
@@ -448,7 +446,7 @@ __format_buffer_general_upper_case(__float_buffer<_Fp>& __buffer, _Tp __value, i
/// - localization needs to do grouping in the integral part.
template <class _Fp, class _Tp>
// TODO FMT _Fp should just be _Tp when to_chars has proper long double support.
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer(
+__float_result __format_buffer(
__float_buffer<_Fp>& __buffer,
_Tp __value,
bool __negative,
@@ -495,7 +493,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer(
# if _LIBCPP_HAS_LOCALIZATION
template <class _OutIt, class _Fp, class _CharT>
-_LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
+_OutIt __format_locale_specific_form(
_OutIt __out_it,
const __float_buffer<_Fp>& __buffer,
const __float_result& __result,
@@ -581,7 +579,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
# endif // _LIBCPP_HAS_LOCALIZATION
template <class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI _OutIt __format_floating_point_non_finite(
+_OutIt __format_floating_point_non_finite(
_OutIt __out_it, __format_spec::__parsed_specifications<_CharT> __specs, bool __negative, bool __isnan) {
char __buffer[4];
char* __last = __formatter::__insert_sign(__buffer, __negative, __specs.__std_.__sign_);
@@ -615,7 +613,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_floating_point_non_finite(
/// \param __num_trailing_zeros The number of 0's to write before the exponent
/// character.
template <class _CharT, class _ParserCharT>
-_LIBCPP_HIDE_FROM_ABI auto __write_using_trailing_zeros(
+auto __write_using_trailing_zeros(
const _CharT* __first,
const _CharT* __last,
output_iterator<const _CharT&> auto __out_it,
@@ -636,7 +634,7 @@ _LIBCPP_HIDE_FROM_ABI auto __write_using_trailing_zeros(
}
template <floating_point _Tp, class _CharT, class _FormatContext>
-_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
+typename _FormatContext::iterator
__format_floating_point(_Tp __value, _FormatContext& __ctx, __format_spec::__parsed_specifications<_CharT> __specs) {
bool __negative = __math::signbit(__value);
@@ -730,7 +728,7 @@ __format_floating_point(_Tp __value, _FormatContext& __ctx, __format_spec::__par
auto __out_it = __ctx.out();
char* __first = __buffer.begin();
- if (__specs.__alignment_ == __format_spec::__alignment ::__zero_padding) {
+ if (__specs.__alignment_ == __format_spec::__alignment::__zero_padding) {
// When there is a sign output it before the padding. Note the __size
// doesn't need any adjustment, regardless whether the sign is written
// here or in __formatter::__write.
@@ -755,14 +753,14 @@ template <__fmt_char_type _CharT>
struct __formatter_floating_point {
public:
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
typename _ParseContext::iterator __result = __parser_.__parse(__ctx, __format_spec::__fields_floating_point);
__format_spec::__process_parsed_floating_point(__parser_, "a floating-point");
return __result;
}
template <floating_point _Tp, class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(_Tp __value, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(_Tp __value, _FormatContext& __ctx) const {
return __formatter::__format_floating_point(__value, __ctx, __parser_.__get_parsed_std_specifications(__ctx));
}
diff --git a/libcxx/include/__format/formatter_integer.h b/libcxx/include/__format/formatter_integer.h
index a0996704e1e2a4..815608cd0fbdcd 100644
--- a/libcxx/include/__format/formatter_integer.h
+++ b/libcxx/include/__format/formatter_integer.h
@@ -33,14 +33,14 @@ template <__fmt_char_type _CharT>
struct __formatter_integer {
public:
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
typename _ParseContext::iterator __result = __parser_.__parse(__ctx, __format_spec::__fields_integral);
__format_spec::__process_parsed_integer(__parser_, "an integer");
return __result;
}
template <integral _Tp, class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(_Tp __value, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(_Tp __value, _FormatContext& __ctx) const {
__format_spec::__parsed_specifications<_CharT> __specs = __parser_.__get_parsed_std_specifications(__ctx);
if (__specs.__std_.__type_ == __format_spec::__type::__char)
diff --git a/libcxx/include/__format/formatter_integral.h b/libcxx/include/__format/formatter_integral.h
index 35fb138c7dace6..2be88ef5a2a999 100644
--- a/libcxx/include/__format/formatter_integral.h
+++ b/libcxx/include/__format/formatter_integral.h
@@ -56,7 +56,7 @@ namespace __formatter {
template <contiguous_iterator _Iterator>
requires same_as<char, iter_value_t<_Iterator>>
-_LIBCPP_HIDE_FROM_ABI inline _Iterator __insert_sign(_Iterator __buf, bool __negative, __format_spec::__sign __sign) {
+inline _Iterator __insert_sign(_Iterator __buf, bool __negative, __format_spec::__sign __sign) {
if (__negative)
*__buf++ = '-';
else
@@ -91,7 +91,7 @@ _LIBCPP_HIDE_FROM_ABI inline _Iterator __insert_sign(_Iterator __buf, bool __neg
* @note The grouping field of the locale is always a @c std::string,
* regardless whether the @c std::numpunct's type is @c char or @c wchar_t.
*/
-_LIBCPP_HIDE_FROM_ABI inline string __determine_grouping(ptrdiff_t __size, const string& __grouping) {
+inline string __determine_grouping(ptrdiff_t __size, const string& __grouping) {
_LIBCPP_ASSERT_INTERNAL(!__grouping.empty() && __size > __grouping[0],
"The slow grouping formatting is used while there will be no separators written");
string __r;
@@ -125,10 +125,9 @@ _LIBCPP_HIDE_FROM_ABI inline string __determine_grouping(ptrdiff_t __size, const
//
template <__fmt_char_type _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__format_char(integral auto __value,
- output_iterator<const _CharT&> auto __out_it,
- __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
+auto __format_char(integral auto __value,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
using _Tp = decltype(__value);
if constexpr (!same_as<_CharT, _Tp>) {
// cmp_less and cmp_greater can't be used for character types.
@@ -157,7 +156,7 @@ __format_char(integral auto __value,
/** Wrapper around @ref to_chars, returning the output iterator. */
template <contiguous_iterator _Iterator, integral _Tp>
requires same_as<char, iter_value_t<_Iterator>>
-_LIBCPP_HIDE_FROM_ABI _Iterator __to_buffer(_Iterator __first, _Iterator __last, _Tp __value, int __base) {
+_Iterator __to_buffer(_Iterator __first, _Iterator __last, _Tp __value, int __base) {
// TODO FMT Evaluate code overhead due to not calling the internal function
// directly. (Should be zero overhead.)
to_chars_result __r = std::to_chars(std::to_address(__first), std::to_address(__last), __value, __base);
@@ -213,7 +212,7 @@ consteval size_t __buffer_size() noexcept
template <class _OutIt, contiguous_iterator _Iterator, class _CharT>
requires same_as<char, iter_value_t<_Iterator>>
-_LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(
+_OutIt __write_using_decimal_separators(
_OutIt __out_it,
_Iterator __begin,
_Iterator __first,
@@ -283,7 +282,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(
template <unsigned_integral _Tp, contiguous_iterator _Iterator, class _CharT, class _FormatContext>
requires same_as<char, iter_value_t<_Iterator>>
-_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator __format_integer(
+typename _FormatContext::iterator __format_integer(
_Tp __value,
_FormatContext& __ctx,
__format_spec::__parsed_specifications<_CharT> __specs,
@@ -343,7 +342,7 @@ _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator __format_integer(
}
template <unsigned_integral _Tp, class _CharT, class _FormatContext>
-_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
+typename _FormatContext::iterator
__format_integer(_Tp __value,
_FormatContext& __ctx,
__format_spec::__parsed_specifications<_CharT> __specs,
@@ -384,7 +383,7 @@ __format_integer(_Tp __value,
}
template <signed_integral _Tp, class _CharT, class _FormatContext>
-_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
+typename _FormatContext::iterator
__format_integer(_Tp __value, _FormatContext& __ctx, __format_spec::__parsed_specifications<_CharT> __specs) {
// Depending on the std-format-spec string the sign and the value
// might not be outputted together:
@@ -422,7 +421,7 @@ struct __bool_strings<wchar_t> {
# endif
template <class _CharT, class _FormatContext>
-_LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
+typename _FormatContext::iterator
__format_bool(bool __value, _FormatContext& __ctx, __format_spec::__parsed_specifications<_CharT> __specs) {
# if _LIBCPP_HAS_LOCALIZATION
if (__specs.__std_.__locale_specific_form_) {
diff --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h
index f4bcaac53f6a84..7bb9bd4b79f26e 100644
--- a/libcxx/include/__format/formatter_output.h
+++ b/libcxx/include/__format/formatter_output.h
@@ -50,8 +50,7 @@ struct __padding_size_result {
size_t __after_;
};
-_LIBCPP_HIDE_FROM_ABI constexpr __padding_size_result
-__padding_size(size_t __size, size_t __width, __format_spec::__alignment __align) {
+constexpr __padding_size_result __padding_size(size_t __size, size_t __width, __format_spec::__alignment __align) {
_LIBCPP_ASSERT_INTERNAL(__width > __size, "don't call this function when no padding is required");
_LIBCPP_ASSERT_INTERNAL(
__align != __format_spec::__alignment::__zero_padding, "the caller should have handled the zero-padding");
@@ -83,8 +82,7 @@ __padding_size(size_t __size, size_t __width, __format_spec::__alignment __align
///
/// This uses a "mass output function" of __format::__output_buffer when possible.
template <__fmt_char_type _CharT, __fmt_char_type _OutCharT = _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__copy(basic_string_view<_CharT> __str, output_iterator<const _OutCharT&> auto __out_it) -> decltype(__out_it) {
+auto __copy(basic_string_view<_CharT> __str, output_iterator<const _OutCharT&> auto __out_it) -> decltype(__out_it) {
if constexpr (std::same_as<decltype(__out_it), std::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
__out_it.__get_container()->__copy(__str);
return __out_it;
@@ -99,16 +97,15 @@ __copy(basic_string_view<_CharT> __str, output_iterator<const _OutCharT&> auto _
template <contiguous_iterator _Iterator,
__fmt_char_type _CharT = typename iterator_traits<_Iterator>::value_type,
__fmt_char_type _OutCharT = _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__copy(_Iterator __first, _Iterator __last, output_iterator<const _OutCharT&> auto __out_it) -> decltype(__out_it) {
+auto __copy(_Iterator __first, _Iterator __last, output_iterator<const _OutCharT&> auto __out_it)
+ -> decltype(__out_it) {
return __formatter::__copy(basic_string_view{__first, __last}, std::move(__out_it));
}
template <contiguous_iterator _Iterator,
__fmt_char_type _CharT = typename iterator_traits<_Iterator>::value_type,
__fmt_char_type _OutCharT = _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__copy(_Iterator __first, size_t __n, output_iterator<const _OutCharT&> auto __out_it) -> decltype(__out_it) {
+auto __copy(_Iterator __first, size_t __n, output_iterator<const _OutCharT&> auto __out_it) -> decltype(__out_it) {
return __formatter::__copy(basic_string_view{std::to_address(__first), __n}, std::move(__out_it));
}
@@ -119,11 +116,9 @@ template <contiguous_iterator _Iterator,
__fmt_char_type _CharT = typename iterator_traits<_Iterator>::value_type,
__fmt_char_type _OutCharT = _CharT,
class _UnaryOperation>
-_LIBCPP_HIDE_FROM_ABI auto
-__transform(_Iterator __first,
- _Iterator __last,
- output_iterator<const _OutCharT&> auto __out_it,
- _UnaryOperation __operation) -> decltype(__out_it) {
+auto __transform(
+ _Iterator __first, _Iterator __last, output_iterator<const _OutCharT&> auto __out_it, _UnaryOperation __operation)
+ -> decltype(__out_it) {
if constexpr (std::same_as<decltype(__out_it), std::back_insert_iterator<__format::__output_buffer<_OutCharT>>>) {
__out_it.__get_container()->__transform(__first, __last, std::move(__operation));
return __out_it;
@@ -139,7 +134,7 @@ __transform(_Iterator __first,
///
/// This uses a "mass output function" of __format::__output_buffer when possible.
template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
-_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, _CharT __value) {
+_OutIt __fill(_OutIt __out_it, size_t __n, _CharT __value) {
if constexpr (std::same_as<decltype(__out_it), std::back_insert_iterator<__format::__output_buffer<_CharT>>>) {
__out_it.__get_container()->__fill(__n, __value);
return __out_it;
@@ -152,7 +147,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, _CharT __value)
}
template <__fmt_char_type _CharT, output_iterator<const _CharT&> _OutIt>
-_LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::__code_point<_CharT> __value) {
+_OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::__code_point<_CharT> __value) {
# if _LIBCPP_HAS_UNICODE
if constexpr (same_as<_CharT, char>) {
std::size_t __bytes = std::countl_one(static_cast<unsigned char>(__value.__data[0]));
@@ -209,11 +204,10 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __fill(_OutIt __out_it, size_t __n, __format_spec::
/// conversion, which means the [\a __first, \a __last) always contains elements
/// of the type \c char.
template <class _CharT, class _ParserCharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__write(basic_string_view<_CharT> __str,
- output_iterator<const _CharT&> auto __out_it,
- __format_spec::__parsed_specifications<_ParserCharT> __specs,
- ptrdiff_t __size) -> decltype(__out_it) {
+auto __write(basic_string_view<_CharT> __str,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_ParserCharT> __specs,
+ ptrdiff_t __size) -> decltype(__out_it) {
if (__size >= __specs.__width_)
return __formatter::__copy(__str, std::move(__out_it));
@@ -224,12 +218,11 @@ __write(basic_string_view<_CharT> __str,
}
template <contiguous_iterator _Iterator, class _ParserCharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__write(_Iterator __first,
- _Iterator __last,
- output_iterator<const iter_value_t<_Iterator>&> auto __out_it,
- __format_spec::__parsed_specifications<_ParserCharT> __specs,
- ptrdiff_t __size) -> decltype(__out_it) {
+auto __write(_Iterator __first,
+ _Iterator __last,
+ output_iterator<const iter_value_t<_Iterator>&> auto __out_it,
+ __format_spec::__parsed_specifications<_ParserCharT> __specs,
+ ptrdiff_t __size) -> decltype(__out_it) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__first <= __last, "Not a valid range");
return __formatter::__write(basic_string_view{__first, __last}, std::move(__out_it), __specs, __size);
}
@@ -238,11 +231,10 @@ __write(_Iterator __first,
///
/// Calls the function above where \a __size = \a __last - \a __first.
template <contiguous_iterator _Iterator, class _ParserCharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__write(_Iterator __first,
- _Iterator __last,
- output_iterator<const iter_value_t<_Iterator>&> auto __out_it,
- __format_spec::__parsed_specifications<_ParserCharT> __specs) -> decltype(__out_it) {
+auto __write(_Iterator __first,
+ _Iterator __last,
+ output_iterator<const iter_value_t<_Iterator>&> auto __out_it,
+ __format_spec::__parsed_specifications<_ParserCharT> __specs) -> decltype(__out_it) {
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__first <= __last, "Not a valid range");
return __formatter::__write(__first, __last, std::move(__out_it), __specs, __last - __first);
}
@@ -251,7 +243,7 @@ template <contiguous_iterator _Iterator,
class _CharT = typename iterator_traits<_Iterator>::value_type,
class _ParserCharT,
class _UnaryOperation>
-_LIBCPP_HIDE_FROM_ABI auto __write_transformed(
+auto __write_transformed(
_Iterator __first,
_Iterator __last,
output_iterator<const _CharT&> auto __out_it,
@@ -275,10 +267,9 @@ _LIBCPP_HIDE_FROM_ABI auto __write_transformed(
///
/// \note When \c _LIBCPP_HAS_UNICODE is false the function assumes the input is ASCII.
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto __write_string_no_precision(
- basic_string_view<_CharT> __str,
- output_iterator<const _CharT&> auto __out_it,
- __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
+auto __write_string_no_precision(basic_string_view<_CharT> __str,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
_LIBCPP_ASSERT_INTERNAL(!__specs.__has_precision(), "use __write_string");
// No padding -> copy the string
@@ -295,7 +286,7 @@ _LIBCPP_HIDE_FROM_ABI auto __write_string_no_precision(
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI int __truncate(basic_string_view<_CharT>& __str, int __precision) {
+int __truncate(basic_string_view<_CharT>& __str, int __precision) {
__format_spec::__column_width_result __result =
__format_spec::__estimate_column_width(__str, __precision, __format_spec::__column_width_rounding::__down);
__str = basic_string_view<_CharT>{__str.begin(), __result.__last_};
diff --git a/libcxx/include/__format/formatter_pointer.h b/libcxx/include/__format/formatter_pointer.h
index cd2a7919021f4f..03d501a8baf7b5 100644
--- a/libcxx/include/__format/formatter_pointer.h
+++ b/libcxx/include/__format/formatter_pointer.h
@@ -32,14 +32,14 @@ template <__fmt_char_type _CharT>
struct __formatter_pointer {
public:
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
typename _ParseContext::iterator __result = __parser_.__parse(__ctx, __format_spec::__fields_pointer);
__format_spec::__process_display_type_pointer(__parser_.__type_, "a pointer");
return __result;
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(const void* __ptr, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(const void* __ptr, _FormatContext& __ctx) const {
__format_spec::__parsed_specifications<_CharT> __specs = __parser_.__get_parsed_std_specifications(__ctx);
__specs.__std_.__alternate_form_ = true;
__specs.__std_.__type_ =
diff --git a/libcxx/include/__format/formatter_string.h b/libcxx/include/__format/formatter_string.h
index 548a27d952588d..6607bb3330dde2 100644
--- a/libcxx/include/__format/formatter_string.h
+++ b/libcxx/include/__format/formatter_string.h
@@ -34,15 +34,14 @@ template <__fmt_char_type _CharT>
struct __formatter_string {
public:
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
typename _ParseContext::iterator __result = __parser_.__parse(__ctx, __format_spec::__fields_string);
__format_spec::__process_display_type_string(__parser_.__type_);
return __result;
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
- format(basic_string_view<_CharT> __str, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(basic_string_view<_CharT> __str, _FormatContext& __ctx) const {
# 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));
@@ -52,7 +51,7 @@ struct __formatter_string {
}
# if _LIBCPP_STD_VER >= 23
- _LIBCPP_HIDE_FROM_ABI constexpr void set_debug_format() { __parser_.__type_ = __format_spec::__type::__debug; }
+ constexpr void set_debug_format() { __parser_.__type_ = __format_spec::__type::__debug; }
# endif
__format_spec::__parser<_CharT> __parser_{
@@ -65,7 +64,7 @@ struct formatter<const _CharT*, _CharT> : public __formatter_string<_CharT> {
using _Base _LIBCPP_NODEBUG = __formatter_string<_CharT>;
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(const _CharT* __str, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(const _CharT* __str, _FormatContext& __ctx) const {
_LIBCPP_ASSERT_INTERNAL(__str, "The basic_format_arg constructor should have prevented an invalid pointer.");
// Converting the input to a basic_string_view means the data is looped over twice;
// - once to determine the length, and
@@ -84,7 +83,7 @@ struct formatter<_CharT*, _CharT> : public formatter<const _CharT*, _CharT> {
using _Base _LIBCPP_NODEBUG = formatter<const _CharT*, _CharT>;
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(_CharT* __str, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(_CharT* __str, _FormatContext& __ctx) const {
return _Base::format(__str, __ctx);
}
};
@@ -95,8 +94,7 @@ struct formatter<_CharT[_Size], _CharT> : public __formatter_string<_CharT> {
using _Base _LIBCPP_NODEBUG = __formatter_string<_CharT>;
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
- format(const _CharT (&__str)[_Size], _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(const _CharT (&__str)[_Size], _FormatContext& __ctx) const {
const _CharT* const __pzero = char_traits<_CharT>::find(__str, _Size, _CharT{});
_LIBCPP_ASSERT_VALID_INPUT_RANGE(__pzero != nullptr, "formatting a non-null-terminated array");
return _Base::format(basic_string_view<_CharT>(__str, static_cast<size_t>(__pzero - __str)), __ctx);
@@ -109,7 +107,7 @@ struct formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT> : public __f
using _Base _LIBCPP_NODEBUG = __formatter_string<_CharT>;
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
+ typename _FormatContext::iterator
format(const basic_string<_CharT, _Traits, _Allocator>& __str, _FormatContext& __ctx) const {
// Drop _Traits and _Allocator to have one std::basic_string formatter.
return _Base::format(basic_string_view<_CharT>(__str.data(), __str.size()), __ctx);
@@ -122,8 +120,7 @@ struct formatter<basic_string_view<_CharT, _Traits>, _CharT> : public __formatte
using _Base _LIBCPP_NODEBUG = __formatter_string<_CharT>;
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
- format(basic_string_view<_CharT, _Traits> __str, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(basic_string_view<_CharT, _Traits> __str, _FormatContext& __ctx) const {
// Drop _Traits to have one std::basic_string_view formatter.
return _Base::format(basic_string_view<_CharT>(__str.data(), __str.size()), __ctx);
}
diff --git a/libcxx/include/__format/formatter_tuple.h b/libcxx/include/__format/formatter_tuple.h
index 8bfb4567f8403f..2a8e6bbba50c3e 100644
--- a/libcxx/include/__format/formatter_tuple.h
+++ b/libcxx/include/__format/formatter_tuple.h
@@ -38,17 +38,15 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <__fmt_char_type _CharT, class _Tuple, formattable<_CharT>... _Args>
struct __formatter_tuple {
- _LIBCPP_HIDE_FROM_ABI constexpr void set_separator(basic_string_view<_CharT> __separator) noexcept {
- __separator_ = __separator;
- }
- _LIBCPP_HIDE_FROM_ABI constexpr void
+ constexpr void set_separator(basic_string_view<_CharT> __separator) noexcept { __separator_ = __separator; }
+ constexpr void
set_brackets(basic_string_view<_CharT> __opening_bracket, basic_string_view<_CharT> __closing_bracket) noexcept {
__opening_bracket_ = __opening_bracket;
__closing_bracket_ = __closing_bracket;
}
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
auto __begin = __parser_.__parse(__ctx, __format_spec::__fields_tuple);
auto __end = __ctx.end();
@@ -85,7 +83,7 @@ struct __formatter_tuple {
}
template <class _FormatContext>
- typename _FormatContext::iterator _LIBCPP_HIDE_FROM_ABI
+ typename _FormatContext::iterator
format(conditional_t<(formattable<const _Args, _CharT> && ...), const _Tuple&, _Tuple&> __tuple,
_FormatContext& __ctx) const {
__format_spec::__parsed_specifications<_CharT> __specs = __parser_.__get_parsed_std_specifications(__ctx);
@@ -115,7 +113,7 @@ struct __formatter_tuple {
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator __format_tuple(auto&& __tuple, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator __format_tuple(auto&& __tuple, _FormatContext& __ctx) const {
__ctx.advance_to(std::ranges::copy(__opening_bracket_, __ctx.out()).out);
std::__for_each_index_sequence(make_index_sequence<sizeof...(_Args)>(), [&]<size_t _Index> {
diff --git a/libcxx/include/__format/indic_conjunct_break_table.h b/libcxx/include/__format/indic_conjunct_break_table.h
index d85782d73286ba..a43003c621d2f6 100644
--- a/libcxx/include/__format/indic_conjunct_break_table.h
+++ b/libcxx/include/__format/indic_conjunct_break_table.h
@@ -514,7 +514,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr uint32_t __entries[403] = {
// clang-format on
/// Returns the indic conjuct break property of a code point.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __property __get_property(const char32_t __code_point) noexcept {
+[[nodiscard]] constexpr __property __get_property(const char32_t __code_point) noexcept {
// The algorithm searches for the upper bound of the range and, when found,
// steps back one entry. This algorithm is used since the code point can be
// anywhere in the range. After a lower bound is found the next step is to
diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h
index 822dfce2c365b0..7ab4700aecc6d1 100644
--- a/libcxx/include/__format/parser_std_format_spec.h
+++ b/libcxx/include/__format/parser_std_format_spec.h
@@ -53,19 +53,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace __format_spec {
-[[noreturn]] _LIBCPP_HIDE_FROM_ABI inline void
-__throw_invalid_option_format_error(const char* __id, const char* __option) {
+[[noreturn]] inline void __throw_invalid_option_format_error(const char* __id, const char* __option) {
std::__throw_format_error(
(string("The format specifier for ") + __id + " does not allow the " + __option + " option").c_str());
}
-[[noreturn]] _LIBCPP_HIDE_FROM_ABI inline void __throw_invalid_type_format_error(const char* __id) {
+[[noreturn]] inline void __throw_invalid_type_format_error(const char* __id) {
std::__throw_format_error(
(string("The type option contains an invalid value for ") + __id + " formatting argument").c_str());
}
template <contiguous_iterator _Iterator, class _ParseContext>
-_LIBCPP_HIDE_FROM_ABI constexpr __format::__parse_number_result<_Iterator>
+constexpr __format::__parse_number_result<_Iterator>
__parse_arg_id(_Iterator __begin, _Iterator __end, _ParseContext& __ctx) {
using _CharT = iter_value_t<_Iterator>;
// This function is a wrapper to call the real parser. But it does the
@@ -83,7 +82,7 @@ __parse_arg_id(_Iterator __begin, _Iterator __end, _ParseContext& __ctx) {
}
template <class _Context>
-_LIBCPP_HIDE_FROM_ABI constexpr uint32_t __substitute_arg_id(basic_format_arg<_Context> __format_arg) {
+constexpr uint32_t __substitute_arg_id(basic_format_arg<_Context> __format_arg) {
// [format.string.std]/8
// If the corresponding formatting argument is not of integral type...
// This wording allows char and bool too. LWG-3720 changes the wording to
@@ -130,7 +129,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr uint32_t __substitute_arg_id(basic_format_arg<_C
///
/// They default to false so when a new field is added it needs to be opted in
/// explicitly.
-struct _LIBCPP_HIDE_FROM_ABI __fields {
+struct __fields {
uint16_t __sign_ : 1 {false};
uint16_t __alternate_form_ : 1 {false};
uint16_t __zero_padding_ : 1 {false};
@@ -175,7 +174,7 @@ inline constexpr __fields __fields_range{.__use_range_fill_ = true, .__clear_bra
inline constexpr __fields __fields_fill_align_width{};
# endif
-_LIBCPP_HIDE_FROM_ABI inline constexpr uint32_t __create_type_mask(__type __t) {
+inline constexpr uint32_t __create_type_mask(__type __t) {
uint32_t __shift = static_cast<uint32_t>(__t);
if (__shift == 0)
return 1;
@@ -250,9 +249,9 @@ struct __parsed_specifications {
__code_point<_CharT> __fill_;
- _LIBCPP_HIDE_FROM_ABI constexpr bool __has_width() const { return __width_ > 0; }
+ constexpr bool __has_width() const { return __width_ > 0; }
- _LIBCPP_HIDE_FROM_ABI constexpr bool __has_precision() const { return __precision_ >= 0; }
+ constexpr bool __has_precision() const { return __precision_ >= 0; }
};
// Validate the struct is small and cheap to copy since the struct is passed by
@@ -296,7 +295,7 @@ class __parser : public __parser_data<_CharT> {
using __base::__width_as_arg_;
__parser() = default;
- _LIBCPP_HIDE_FROM_ABI constexpr __parser(__parser_data<_CharT> __data) : __parser_data<_CharT>(__data) {}
+ constexpr __parser(__parser_data<_CharT> __data) : __parser_data<_CharT>(__data) {}
// Parses the format specification.
//
@@ -312,7 +311,7 @@ class __parser : public __parser_data<_CharT> {
// functions are used. In that case the error will be detected during
// compilation and there is no need to pay for the run-time overhead.
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator __parse(_ParseContext& __ctx, __fields __fields) {
+ constexpr typename _ParseContext::iterator __parse(_ParseContext& __ctx, __fields __fields) {
auto __begin = __ctx.begin();
auto __end = __ctx.end();
if (__begin == __end || *__begin == _CharT('}') || (__fields.__use_range_fill_ && *__begin == _CharT(':')))
@@ -408,8 +407,7 @@ class __parser : public __parser_data<_CharT> {
// line.
// Note future versions of C++ may allow better compile-time error
// reporting.
- _LIBCPP_HIDE_FROM_ABI constexpr void
- __validate(__fields __fields, const char* __id, uint32_t __type_mask = -1) const {
+ constexpr void __validate(__fields __fields, const char* __id, uint32_t __type_mask = -1) const {
if (!__fields.__sign_ && __sign_ != __sign::__default) {
if (std::is_constant_evaluated())
std::__throw_format_error("The format specifier does not allow the sign option");
@@ -454,7 +452,7 @@ class __parser : public __parser_data<_CharT> {
}
/// \returns the `__parsed_specifications` with the resolved dynamic sizes..
- _LIBCPP_HIDE_FROM_ABI __parsed_specifications<_CharT> __get_parsed_std_specifications(auto& __ctx) const {
+ __parsed_specifications<_CharT> __get_parsed_std_specifications(auto& __ctx) const {
return __parsed_specifications<_CharT>{
.__std_ = __std{.__alignment_ = __alignment_,
.__sign_ = __sign_,
@@ -466,7 +464,7 @@ class __parser : public __parser_data<_CharT> {
.__fill_{__fill_}};
}
- _LIBCPP_HIDE_FROM_ABI __parsed_specifications<_CharT> __get_parsed_chrono_specifications(auto& __ctx) const {
+ __parsed_specifications<_CharT> __get_parsed_chrono_specifications(auto& __ctx) const {
return __parsed_specifications<_CharT>{
.__chrono_ =
__chrono{.__alignment_ = __alignment_,
@@ -483,7 +481,7 @@ class __parser : public __parser_data<_CharT> {
}
private:
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_alignment(_CharT __c) {
+ constexpr bool __parse_alignment(_CharT __c) {
switch (__c) {
case _CharT('<'):
__alignment_ = __alignment::__left;
@@ -500,7 +498,7 @@ class __parser : public __parser_data<_CharT> {
return false;
}
- _LIBCPP_HIDE_FROM_ABI constexpr void __validate_fill_character(_CharT __fill) {
+ constexpr void __validate_fill_character(_CharT __fill) {
// The forbidden fill characters all code points formed from a single code unit, thus the
// check can be omitted when more code units are used.
if (__fill == _CharT('{'))
@@ -514,7 +512,7 @@ class __parser : public __parser_data<_CharT> {
# if _LIBCPP_HAS_WIDE_CHARACTERS
|| (same_as<_CharT, wchar_t> && sizeof(wchar_t) == 2)
# endif
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end) {
+ constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__begin != __end,
"when called with an empty input the function will cause "
@@ -547,7 +545,7 @@ class __parser : public __parser_data<_CharT> {
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <contiguous_iterator _Iterator>
requires(same_as<_CharT, wchar_t> && sizeof(wchar_t) == 4)
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end) {
+ constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__begin != __end,
"when called with an empty input the function will cause "
@@ -575,7 +573,7 @@ class __parser : public __parser_data<_CharT> {
# else // _LIBCPP_HAS_UNICODE
// range-fill and tuple-fill are identical
template <contiguous_iterator _Iterator>
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end) {
+ constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__begin != __end,
"when called with an empty input the function will cause "
@@ -600,7 +598,7 @@ class __parser : public __parser_data<_CharT> {
# endif // _LIBCPP_HAS_UNICODE
template <contiguous_iterator _Iterator>
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_sign(_Iterator& __begin) {
+ constexpr bool __parse_sign(_Iterator& __begin) {
switch (*__begin) {
case _CharT('-'):
__sign_ = __sign::__minus;
@@ -619,7 +617,7 @@ class __parser : public __parser_data<_CharT> {
}
template <contiguous_iterator _Iterator>
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_alternate_form(_Iterator& __begin) {
+ constexpr bool __parse_alternate_form(_Iterator& __begin) {
if (*__begin != _CharT('#'))
return false;
@@ -629,7 +627,7 @@ class __parser : public __parser_data<_CharT> {
}
template <contiguous_iterator _Iterator>
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_zero_padding(_Iterator& __begin) {
+ constexpr bool __parse_zero_padding(_Iterator& __begin) {
if (*__begin != _CharT('0'))
return false;
@@ -640,7 +638,7 @@ class __parser : public __parser_data<_CharT> {
}
template <contiguous_iterator _Iterator>
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_width(_Iterator& __begin, _Iterator __end, auto& __ctx) {
+ constexpr bool __parse_width(_Iterator& __begin, _Iterator __end, auto& __ctx) {
if (*__begin == _CharT('0'))
std::__throw_format_error("The width option should not have a leading zero");
@@ -665,7 +663,7 @@ class __parser : public __parser_data<_CharT> {
}
template <contiguous_iterator _Iterator>
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_precision(_Iterator& __begin, _Iterator __end, auto& __ctx) {
+ constexpr bool __parse_precision(_Iterator& __begin, _Iterator __end, auto& __ctx) {
if (*__begin != _CharT('.'))
return false;
@@ -692,7 +690,7 @@ class __parser : public __parser_data<_CharT> {
}
template <contiguous_iterator _Iterator>
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_locale_specific_form(_Iterator& __begin) {
+ constexpr bool __parse_locale_specific_form(_Iterator& __begin) {
if (*__begin != _CharT('L'))
return false;
@@ -702,7 +700,7 @@ class __parser : public __parser_data<_CharT> {
}
template <contiguous_iterator _Iterator>
- _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_clear_brackets(_Iterator& __begin) {
+ constexpr bool __parse_clear_brackets(_Iterator& __begin) {
if (*__begin != _CharT('n'))
return false;
@@ -712,7 +710,7 @@ class __parser : public __parser_data<_CharT> {
}
template <contiguous_iterator _Iterator>
- _LIBCPP_HIDE_FROM_ABI constexpr void __parse_type(_Iterator& __begin) {
+ constexpr void __parse_type(_Iterator& __begin) {
// Determines the type. It does not validate whether the selected type is
// valid. Most formatters have optional fields that are only allowed for
// certain types. These parsers need to do validation after the type has
@@ -784,14 +782,14 @@ class __parser : public __parser_data<_CharT> {
++__begin;
}
- _LIBCPP_HIDE_FROM_ABI int32_t __get_width(auto& __ctx) const {
+ int32_t __get_width(auto& __ctx) const {
if (!__width_as_arg_)
return __width_;
return __format_spec::__substitute_arg_id(__ctx.arg(__width_));
}
- _LIBCPP_HIDE_FROM_ABI int32_t __get_precision(auto& __ctx) const {
+ int32_t __get_precision(auto& __ctx) const {
if (!__precision_as_arg_)
return __precision_;
@@ -805,7 +803,7 @@ static_assert(sizeof(__parser<char>) == 16);
static_assert(sizeof(__parser<wchar_t>) == 16);
# endif
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_string(__format_spec::__type __type) {
+constexpr void __process_display_type_string(__format_spec::__type __type) {
switch (__type) {
case __format_spec::__type::__default:
case __format_spec::__type::__string:
@@ -818,19 +816,19 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_string(__format_spec
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_bool_string(__parser<_CharT>& __parser, const char* __id) {
+constexpr void __process_display_type_bool_string(__parser<_CharT>& __parser, const char* __id) {
__parser.__validate(__format_spec::__fields_bool, __id);
if (__parser.__alignment_ == __alignment::__default)
__parser.__alignment_ = __alignment::__left;
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_char(__parser<_CharT>& __parser, const char* __id) {
+constexpr void __process_display_type_char(__parser<_CharT>& __parser, const char* __id) {
__format_spec::__process_display_type_bool_string(__parser, __id);
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_bool(__parser<_CharT>& __parser, const char* __id) {
+constexpr void __process_parsed_bool(__parser<_CharT>& __parser, const char* __id) {
switch (__parser.__type_) {
case __format_spec::__type::__default:
case __format_spec::__type::__string:
@@ -851,7 +849,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_bool(__parser<_CharT>& __p
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_char(__parser<_CharT>& __parser, const char* __id) {
+constexpr void __process_parsed_char(__parser<_CharT>& __parser, const char* __id) {
switch (__parser.__type_) {
case __format_spec::__type::__default:
case __format_spec::__type::__char:
@@ -873,7 +871,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_char(__parser<_CharT>& __p
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_integer(__parser<_CharT>& __parser, const char* __id) {
+constexpr void __process_parsed_integer(__parser<_CharT>& __parser, const char* __id) {
switch (__parser.__type_) {
case __format_spec::__type::__default:
case __format_spec::__type::__binary_lower_case:
@@ -894,7 +892,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_integer(__parser<_CharT>&
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_floating_point(__parser<_CharT>& __parser, const char* __id) {
+constexpr void __process_parsed_floating_point(__parser<_CharT>& __parser, const char* __id) {
switch (__parser.__type_) {
case __format_spec::__type::__default:
case __format_spec::__type::__hexfloat_lower_case:
@@ -917,7 +915,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_floating_point(__parser<_C
}
}
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_pointer(__format_spec::__type __type, const char* __id) {
+constexpr void __process_display_type_pointer(__format_spec::__type __type, const char* __id) {
switch (__type) {
case __format_spec::__type::__default:
case __format_spec::__type::__pointer_lower_case:
@@ -957,7 +955,7 @@ enum class __column_width_rounding { __down, __up };
namespace __detail {
template <contiguous_iterator _Iterator>
-_LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_Iterator> __estimate_column_width_grapheme_clustering(
+constexpr __column_width_result<_Iterator> __estimate_column_width_grapheme_clustering(
_Iterator __first, _Iterator __last, size_t __maximum, __column_width_rounding __rounding) noexcept {
using _CharT = iter_value_t<_Iterator>;
__unicode::__extended_grapheme_cluster_view<_CharT> __view{__first, __last};
@@ -1013,7 +1011,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_Iterator> __estimate_colu
// - https://en.wikipedia.org/wiki/UTF-8#Encoding
// - https://en.wikipedia.org/wiki/UTF-16#U+D800_to_U+DFFF
-_LIBCPP_HIDE_FROM_ABI constexpr bool __is_ascii(char32_t __c) { return __c < 0x80; }
+constexpr bool __is_ascii(char32_t __c) { return __c < 0x80; }
/// Determines the number of output columns needed to render the input.
///
@@ -1030,7 +1028,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __is_ascii(char32_t __c) { return __c < 0x8
/// \c __down result.__width_ <= __maximum
/// \c __up result.__width_ <= __maximum + 1
template <class _CharT, class _Iterator = typename basic_string_view<_CharT>::const_iterator>
-_LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_Iterator> __estimate_column_width(
+constexpr __column_width_result<_Iterator> __estimate_column_width(
basic_string_view<_CharT> __str, size_t __maximum, __column_width_rounding __rounding) noexcept {
// The width estimation is done in two steps:
// - Quickly process for the ASCII part. ASCII has the following properties
@@ -1077,7 +1075,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_Iterator> __estimate_colu
}
# else // _LIBCPP_HAS_UNICODE
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<typename basic_string_view<_CharT>::const_iterator>
+constexpr __column_width_result<typename basic_string_view<_CharT>::const_iterator>
__estimate_column_width(basic_string_view<_CharT> __str, size_t __maximum, __column_width_rounding) noexcept {
// When Unicode isn't supported assume ASCII and every code unit is one code
// point. In ASCII the estimated column width is always one. Thus there's no
diff --git a/libcxx/include/__format/range_default_formatter.h b/libcxx/include/__format/range_default_formatter.h
index bc6153d55bf325..3d1c76a9f41bc6 100644
--- a/libcxx/include/__format/range_default_formatter.h
+++ b/libcxx/include/__format/range_default_formatter.h
@@ -61,22 +61,21 @@ struct __range_default_formatter<range_format::sequence, _Rp, _CharT> {
range_formatter<remove_cvref_t<ranges::range_reference_t<__maybe_const_r>>, _CharT> __underlying_;
public:
- _LIBCPP_HIDE_FROM_ABI constexpr void set_separator(basic_string_view<_CharT> __separator) noexcept {
+ constexpr void set_separator(basic_string_view<_CharT> __separator) noexcept {
__underlying_.set_separator(__separator);
}
- _LIBCPP_HIDE_FROM_ABI constexpr void
+ constexpr void
set_brackets(basic_string_view<_CharT> __opening_bracket, basic_string_view<_CharT> __closing_bracket) noexcept {
__underlying_.set_brackets(__opening_bracket, __closing_bracket);
}
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
return __underlying_.parse(__ctx);
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
- format(__maybe_const_r& __range, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(__maybe_const_r& __range, _FormatContext& __ctx) const {
return __underlying_.format(__range, __ctx);
}
};
@@ -89,7 +88,7 @@ struct __range_default_formatter<range_format::map, _Rp, _CharT> {
range_formatter<__element_type, _CharT> __underlying_;
public:
- _LIBCPP_HIDE_FROM_ABI constexpr __range_default_formatter()
+ constexpr __range_default_formatter()
requires(__fmt_pair_like<__element_type>)
{
__underlying_.set_brackets(_LIBCPP_STATICALLY_WIDEN(_CharT, "{"), _LIBCPP_STATICALLY_WIDEN(_CharT, "}"));
@@ -98,13 +97,12 @@ struct __range_default_formatter<range_format::map, _Rp, _CharT> {
}
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
return __underlying_.parse(__ctx);
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
- format(__maybe_const_map& __range, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(__maybe_const_map& __range, _FormatContext& __ctx) const {
return __underlying_.format(__range, __ctx);
}
};
@@ -117,18 +115,17 @@ struct __range_default_formatter<range_format::set, _Rp, _CharT> {
range_formatter<__element_type, _CharT> __underlying_;
public:
- _LIBCPP_HIDE_FROM_ABI constexpr __range_default_formatter() {
+ constexpr __range_default_formatter() {
__underlying_.set_brackets(_LIBCPP_STATICALLY_WIDEN(_CharT, "{"), _LIBCPP_STATICALLY_WIDEN(_CharT, "}"));
}
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
return __underlying_.parse(__ctx);
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
- format(__maybe_const_set& __range, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(__maybe_const_set& __range, _FormatContext& __ctx) const {
return __underlying_.format(__range, __ctx);
}
};
@@ -145,7 +142,7 @@ struct __range_default_formatter<_Kp, _Rp, _CharT> {
public:
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
typename _ParseContext::iterator __i = __underlying_.parse(__ctx);
if constexpr (_Kp == range_format::debug_string)
__underlying_.set_debug_format();
@@ -153,7 +150,7 @@ struct __range_default_formatter<_Kp, _Rp, _CharT> {
}
template <class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
+ typename _FormatContext::iterator
format(conditional_t<ranges::input_range<const _Rp>, const _Rp&, _Rp&> __range, _FormatContext& __ctx) const {
// When the range is contiguous use a basic_string_view instead to avoid a
// copy of the underlying data. The basic_string_view formatter
diff --git a/libcxx/include/__format/range_formatter.h b/libcxx/include/__format/range_formatter.h
index 01b05a63654a8f..ba144ac920a02c 100644
--- a/libcxx/include/__format/range_formatter.h
+++ b/libcxx/include/__format/range_formatter.h
@@ -41,20 +41,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _CharT = char>
requires same_as<remove_cvref_t<_Tp>, _Tp> && formattable<_Tp, _CharT>
struct range_formatter {
- _LIBCPP_HIDE_FROM_ABI constexpr void set_separator(basic_string_view<_CharT> __separator) noexcept {
- __separator_ = __separator;
- }
- _LIBCPP_HIDE_FROM_ABI constexpr void
+ constexpr void set_separator(basic_string_view<_CharT> __separator) noexcept { __separator_ = __separator; }
+ constexpr void
set_brackets(basic_string_view<_CharT> __opening_bracket, basic_string_view<_CharT> __closing_bracket) noexcept {
__opening_bracket_ = __opening_bracket;
__closing_bracket_ = __closing_bracket;
}
- _LIBCPP_HIDE_FROM_ABI constexpr formatter<_Tp, _CharT>& underlying() noexcept { return __underlying_; }
- _LIBCPP_HIDE_FROM_ABI constexpr const formatter<_Tp, _CharT>& underlying() const noexcept { return __underlying_; }
+ constexpr formatter<_Tp, _CharT>& underlying() noexcept { return __underlying_; }
+ constexpr const formatter<_Tp, _CharT>& underlying() const noexcept { return __underlying_; }
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
+ constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
auto __begin = __parser_.__parse(__ctx, __format_spec::__fields_range);
auto __end = __ctx.end();
// Note the cases where __begin == __end in this code only happens when the
@@ -121,7 +119,7 @@ struct range_formatter {
template <ranges::input_range _Rp, class _FormatContext>
requires formattable<ranges::range_reference_t<_Rp>, _CharT> &&
same_as<remove_cvref_t<ranges::range_reference_t<_Rp>>, _Tp>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator format(_Rp&& __range, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator format(_Rp&& __range, _FormatContext& __ctx) const {
__format_spec::__parsed_specifications<_CharT> __specs = __parser_.__get_parsed_std_specifications(__ctx);
if (!__specs.__has_width())
@@ -152,7 +150,7 @@ struct range_formatter {
}
template <ranges::input_range _Rp, class _FormatContext>
- typename _FormatContext::iterator _LIBCPP_HIDE_FROM_ABI
+ typename _FormatContext::iterator
__format_range(_Rp&& __range, _FormatContext& __ctx, __format_spec::__parsed_specifications<_CharT> __specs) const {
if constexpr (same_as<_Tp, _CharT>) {
switch (__specs.__std_.__type_) {
@@ -167,7 +165,7 @@ struct range_formatter {
}
template <ranges::input_range _Rp, class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
+ typename _FormatContext::iterator
__format_as_string(_Rp&& __range, _FormatContext& __ctx, bool __debug_format) const {
// When the range is contiguous use a basic_string_view instead to avoid a
// copy of the underlying data. The basic_string_view formatter
@@ -191,8 +189,7 @@ struct range_formatter {
}
template <ranges::input_range _Rp, class _FormatContext>
- _LIBCPP_HIDE_FROM_ABI typename _FormatContext::iterator
- __format_as_sequence(_Rp&& __range, _FormatContext& __ctx) const {
+ typename _FormatContext::iterator __format_as_sequence(_Rp&& __range, _FormatContext& __ctx) const {
__ctx.advance_to(ranges::copy(__opening_bracket_, __ctx.out()).out);
bool __use_separator = false;
for (auto&& __e : __range) {
@@ -212,7 +209,7 @@ struct range_formatter {
private:
template <contiguous_iterator _Iterator>
- _LIBCPP_HIDE_FROM_ABI constexpr void __parse_type(_Iterator& __begin, _Iterator __end) {
+ constexpr void __parse_type(_Iterator& __begin, _Iterator __end) {
switch (*__begin) {
case _CharT('m'):
if constexpr (__fmt_pair_like<_Tp>) {
@@ -246,7 +243,7 @@ struct range_formatter {
}
template <class _ParseContext>
- _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator
+ constexpr typename _ParseContext::iterator
__parse_empty_range_underlying_spec(_ParseContext& __ctx, typename _ParseContext::iterator __begin) {
__ctx.advance_to(__begin);
[[maybe_unused]] typename _ParseContext::iterator __result = __underlying_.parse(__ctx);
diff --git a/libcxx/include/__format/unicode.h b/libcxx/include/__format/unicode.h
index dbb87f2d711b0a..50ffa13bec4baa 100644
--- a/libcxx/include/__format/unicode.h
+++ b/libcxx/include/__format/unicode.h
@@ -78,32 +78,24 @@ inline constexpr char32_t __replacement_character = U'\ufffd';
// ignore the error status and always use the code point.
inline constexpr __consume_result __consume_result_error{__replacement_character, __consume_result::__error};
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool __is_high_surrogate(char32_t __value) {
- return __value >= 0xd800 && __value <= 0xdbff;
-}
+[[nodiscard]] constexpr bool __is_high_surrogate(char32_t __value) { return __value >= 0xd800 && __value <= 0xdbff; }
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool __is_low_surrogate(char32_t __value) {
- return __value >= 0xdc00 && __value <= 0xdfff;
-}
+[[nodiscard]] constexpr bool __is_low_surrogate(char32_t __value) { return __value >= 0xdc00 && __value <= 0xdfff; }
// https://www.unicode.org/glossary/#surrogate_code_point
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr bool __is_surrogate(char32_t __value) {
- return __value >= 0xd800 && __value <= 0xdfff;
-}
+[[nodiscard]] inline constexpr bool __is_surrogate(char32_t __value) { return __value >= 0xd800 && __value <= 0xdfff; }
// https://www.unicode.org/glossary/#code_point
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr bool __is_code_point(char32_t __value) {
- return __value <= 0x10ffff;
-}
+[[nodiscard]] inline constexpr bool __is_code_point(char32_t __value) { return __value <= 0x10ffff; }
// https://www.unicode.org/glossary/#unicode_scalar_value
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline constexpr bool __is_scalar_value(char32_t __value) {
+[[nodiscard]] inline constexpr bool __is_scalar_value(char32_t __value) {
return __unicode::__is_code_point(__value) && !__unicode::__is_surrogate(__value);
}
template <class _Iterator>
requires same_as<iter_value_t<_Iterator>, char>
-_LIBCPP_HIDE_FROM_ABI constexpr bool __is_continuation(_Iterator __char, int __count) {
+constexpr bool __is_continuation(_Iterator __char, int __count) {
do {
if ((*__char & 0b1100'0000) != 0b1000'0000)
return false;
@@ -126,11 +118,10 @@ class __code_point_view<char> {
using _Iterator _LIBCPP_NODEBUG = basic_string_view<char>::const_iterator;
public:
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(_Iterator __first, _Iterator __last)
- : __first_(__first), __last_(__last) {}
+ constexpr explicit __code_point_view(_Iterator __first, _Iterator __last) : __first_(__first), __last_(__last) {}
- _LIBCPP_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }
- _LIBCPP_HIDE_FROM_ABI constexpr _Iterator __position() const noexcept { return __first_; }
+ constexpr bool __at_end() const noexcept { return __first_ == __last_; }
+ constexpr _Iterator __position() const noexcept { return __first_; }
// https://www.unicode.org/versions/latest/ch03.pdf#G7404
// Based on Table 3-7, Well-Formed UTF-8 Byte Sequences
@@ -154,7 +145,7 @@ class __code_point_view<char> {
// Unlike other parsers, these invalid entries are tested after decoding.
// - The parser always needs to consume these code units
// - The code is optimized for well-formed UTF-8
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __consume_result __consume() noexcept {
+ [[nodiscard]] constexpr __consume_result __consume() noexcept {
_LIBCPP_ASSERT_INTERNAL(__first_ != __last_, "can't move beyond the end of input");
// Based on the number of leading 1 bits the number of code units in the
@@ -236,13 +227,9 @@ class __code_point_view<char> {
};
# if _LIBCPP_HAS_WIDE_CHARACTERS
-_LIBCPP_HIDE_FROM_ABI constexpr bool __is_surrogate_pair_high(wchar_t __value) {
- return __value >= 0xd800 && __value <= 0xdbff;
-}
+constexpr bool __is_surrogate_pair_high(wchar_t __value) { return __value >= 0xd800 && __value <= 0xdbff; }
-_LIBCPP_HIDE_FROM_ABI constexpr bool __is_surrogate_pair_low(wchar_t __value) {
- return __value >= 0xdc00 && __value <= 0xdfff;
-}
+constexpr bool __is_surrogate_pair_low(wchar_t __value) { return __value >= 0xdc00 && __value <= 0xdfff; }
/// This specialization depends on the size of wchar_t
/// - 2 UTF-16 (for example Windows and AIX)
@@ -254,13 +241,12 @@ class __code_point_view<wchar_t> {
public:
static_assert(sizeof(wchar_t) == 2 || sizeof(wchar_t) == 4, "sizeof(wchar_t) has a not implemented value");
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(_Iterator __first, _Iterator __last)
- : __first_(__first), __last_(__last) {}
+ constexpr explicit __code_point_view(_Iterator __first, _Iterator __last) : __first_(__first), __last_(__last) {}
- _LIBCPP_HIDE_FROM_ABI constexpr _Iterator __position() const noexcept { return __first_; }
- _LIBCPP_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }
+ constexpr _Iterator __position() const noexcept { return __first_; }
+ constexpr bool __at_end() const noexcept { return __first_ == __last_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __consume_result __consume() noexcept {
+ [[nodiscard]] constexpr __consume_result __consume() noexcept {
_LIBCPP_ASSERT_INTERNAL(__first_ != __last_, "can't move beyond the end of input");
char32_t __value = static_cast<char32_t>(*__first_++);
@@ -304,7 +290,7 @@ class __extended_grapheme_cluster_break {
using __inCB_property _LIBCPP_NODEBUG = __indic_conjunct_break::__property;
public:
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __extended_grapheme_cluster_break(char32_t __first_code_point)
+ constexpr explicit __extended_grapheme_cluster_break(char32_t __first_code_point)
: __prev_code_point_(__first_code_point),
__prev_property_(__extended_grapheme_custer_property_boundary::__get_property(__first_code_point)) {
// Initializes the active rule.
@@ -316,7 +302,7 @@ class __extended_grapheme_cluster_break {
__active_rule_ = __rule::__GB9c_indic_conjunct_break;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(char32_t __next_code_point) {
+ [[nodiscard]] constexpr bool operator()(char32_t __next_code_point) {
__EGC_property __next_property = __extended_grapheme_custer_property_boundary::__get_property(__next_code_point);
bool __result = __evaluate(__next_code_point, __next_property);
__prev_code_point_ = __next_code_point;
@@ -326,14 +312,13 @@ class __extended_grapheme_cluster_break {
// The code point whose break propery are considered during the next
// evaluation cyle.
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr char32_t __current_code_point() const { return __prev_code_point_; }
+ [[nodiscard]] constexpr char32_t __current_code_point() const { return __prev_code_point_; }
private:
// The naming of the identifiers matches the Unicode standard.
// NOLINTBEGIN(readability-identifier-naming)
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool
- __evaluate(char32_t __next_code_point, __EGC_property __next_property) {
+ [[nodiscard]] constexpr bool __evaluate(char32_t __next_code_point, __EGC_property __next_property) {
switch (__active_rule_) {
case __rule::__none:
return __evaluate_none(__next_code_point, __next_property);
@@ -347,7 +332,7 @@ class __extended_grapheme_cluster_break {
__libcpp_unreachable();
}
- _LIBCPP_HIDE_FROM_ABI constexpr bool __evaluate_none(char32_t __next_code_point, __EGC_property __next_property) {
+ constexpr bool __evaluate_none(char32_t __next_code_point, __EGC_property __next_property) {
// *** Break at the start and end of text, unless the text is empty. ***
_LIBCPP_ASSERT_INTERNAL(__prev_property_ != __EGC_property::__sot, "should be handled in the constructor"); // GB1
@@ -417,7 +402,7 @@ class __extended_grapheme_cluster_break {
return true; // GB999
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool
+ [[nodiscard]] constexpr bool
__evaluate_GB9c_indic_conjunct_break(char32_t __next_code_point, __EGC_property __next_property) {
__inCB_property __break = __indic_conjunct_break::__get_property(__next_code_point);
if (__break == __inCB_property::__none) {
@@ -454,8 +439,7 @@ class __extended_grapheme_cluster_break {
__libcpp_unreachable();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool
- __evaluate_GB11_emoji(char32_t __next_code_point, __EGC_property __next_property) {
+ [[nodiscard]] constexpr bool __evaluate_GB11_emoji(char32_t __next_code_point, __EGC_property __next_property) {
switch (__GB11_emoji_state_) {
case __GB11_emoji_state::__Extended_Pictographic:
if (__next_property == __EGC_property::__Extend) {
@@ -484,7 +468,7 @@ class __extended_grapheme_cluster_break {
__libcpp_unreachable();
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool
+ [[nodiscard]] constexpr bool
__evaluate_GB12_GB13_regional_indicator(char32_t __next_code_point, __EGC_property __next_property) {
__active_rule_ = __rule::__none;
if (__next_property == __EGC_property::__Regional_Indicator)
@@ -530,7 +514,7 @@ class __extended_grapheme_cluster_view {
using _Iterator _LIBCPP_NODEBUG = typename basic_string_view<_CharT>::const_iterator;
public:
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __extended_grapheme_cluster_view(_Iterator __first, _Iterator __last)
+ constexpr explicit __extended_grapheme_cluster_view(_Iterator __first, _Iterator __last)
: __code_point_view_(__first, __last), __at_break_(__code_point_view_.__consume().__code_point) {}
struct __cluster {
@@ -547,7 +531,7 @@ class __extended_grapheme_cluster_view {
_Iterator __last_;
};
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __cluster __consume() {
+ [[nodiscard]] constexpr __cluster __consume() {
char32_t __code_point = __at_break_.__current_code_point();
_Iterator __position = __code_point_view_.__position();
while (!__code_point_view_.__at_end()) {
@@ -575,13 +559,12 @@ class __code_point_view {
using _Iterator _LIBCPP_NODEBUG = typename basic_string_view<_CharT>::const_iterator;
public:
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(_Iterator __first, _Iterator __last)
- : __first_(__first), __last_(__last) {}
+ constexpr explicit __code_point_view(_Iterator __first, _Iterator __last) : __first_(__first), __last_(__last) {}
- _LIBCPP_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }
- _LIBCPP_HIDE_FROM_ABI constexpr _Iterator __position() const noexcept { return __first_; }
+ constexpr bool __at_end() const noexcept { return __first_ == __last_; }
+ constexpr _Iterator __position() const noexcept { return __first_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __consume_result __consume() noexcept {
+ [[nodiscard]] constexpr __consume_result __consume() noexcept {
_LIBCPP_ASSERT_INTERNAL(__first_ != __last_, "can't move beyond the end of input");
return {static_cast<char32_t>(*__first_++)};
}
diff --git a/libcxx/include/__format/width_estimation_table.h b/libcxx/include/__format/width_estimation_table.h
index ae10a77a5b9801..c266c21c891348 100644
--- a/libcxx/include/__format/width_estimation_table.h
+++ b/libcxx/include/__format/width_estimation_table.h
@@ -242,7 +242,7 @@ inline constexpr uint32_t __table_upper_bound = 0x0003fffd;
/// Returns the estimated width of a Unicode code point.
///
/// \\pre The code point is a valid Unicode code point.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr int __estimated_width(const char32_t __code_point) noexcept {
+[[nodiscard]] constexpr int __estimated_width(const char32_t __code_point) noexcept {
// Since __table_upper_bound contains the unshifted range do the
// comparison without shifting.
if (__code_point > __table_upper_bound) [[unlikely]]
diff --git a/libcxx/include/__format/write_escaped.h b/libcxx/include/__format/write_escaped.h
index aa74940032f786..84d768c02e499f 100644
--- a/libcxx/include/__format/write_escaped.h
+++ b/libcxx/include/__format/write_escaped.h
@@ -44,10 +44,9 @@ namespace __formatter {
///
/// \note When \c _LIBCPP_HAS_UNICODE is false the function assumes the input is ASCII.
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__write_string(basic_string_view<_CharT> __str,
- output_iterator<const _CharT&> auto __out_it,
- __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
+auto __write_string(basic_string_view<_CharT> __str,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
if (!__specs.__has_precision())
return __formatter::__write_string_no_precision(__str, std::move(__out_it), __specs);
@@ -62,13 +61,12 @@ __write_string(basic_string_view<_CharT> __str,
struct __nul_terminator {};
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI bool operator==(const _CharT* __cstr, __nul_terminator) {
+bool operator==(const _CharT* __cstr, __nul_terminator) {
return *__cstr == _CharT('\0');
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI void
-__write_escaped_code_unit(basic_string<_CharT>& __str, char32_t __value, const _CharT* __prefix) {
+void __write_escaped_code_unit(basic_string<_CharT>& __str, char32_t __value, const _CharT* __prefix) {
back_insert_iterator __out_it{__str};
std::ranges::copy(__prefix, __nul_terminator{}, __out_it);
@@ -86,7 +84,7 @@ __write_escaped_code_unit(basic_string<_CharT>& __str, char32_t __value, const _
// hex-digit-sequence is the shortest hexadecimal representation of C using
// lower-case hexadecimal digits.
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI void __write_well_formed_escaped_code_unit(basic_string<_CharT>& __str, char32_t __value) {
+void __write_well_formed_escaped_code_unit(basic_string<_CharT>& __str, char32_t __value) {
__formatter::__write_escaped_code_unit(__str, __value, _LIBCPP_STATICALLY_WIDEN(_CharT, "\\u{"));
}
@@ -96,13 +94,12 @@ _LIBCPP_HIDE_FROM_ABI void __write_well_formed_escaped_code_unit(basic_string<_C
// hex-digit-sequence is the shortest hexadecimal representation of U using
// lower-case hexadecimal digits.
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI void __write_escape_ill_formed_code_unit(basic_string<_CharT>& __str, char32_t __value) {
+void __write_escape_ill_formed_code_unit(basic_string<_CharT>& __str, char32_t __value) {
__formatter::__write_escaped_code_unit(__str, __value, _LIBCPP_STATICALLY_WIDEN(_CharT, "\\x{"));
}
template <class _CharT>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool
-__is_escaped_sequence_written(basic_string<_CharT>& __str, bool __last_escaped, char32_t __value) {
+[[nodiscard]] bool __is_escaped_sequence_written(basic_string<_CharT>& __str, bool __last_escaped, char32_t __value) {
# if !_LIBCPP_HAS_UNICODE
// For ASCII assume everything above 127 is printable.
if (__value > 127)
@@ -128,7 +125,7 @@ __is_escaped_sequence_written(basic_string<_CharT>& __str, bool __last_escaped,
}
template <class _CharT>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr char32_t __to_char32(_CharT __value) {
+[[nodiscard]] constexpr char32_t __to_char32(_CharT __value) {
return static_cast<make_unsigned_t<_CharT>>(__value);
}
@@ -136,7 +133,7 @@ enum class __escape_quotation_mark { __apostrophe, __double_quote };
// [format.string.escaped]/2
template <class _CharT>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI bool __is_escaped_sequence_written(
+[[nodiscard]] bool __is_escaped_sequence_written(
basic_string<_CharT>& __str, char32_t __value, bool __last_escaped, __escape_quotation_mark __mark) {
// 2.2.1.1 - Mapped character in [tab:format.escape.sequences]
switch (__value) {
@@ -183,8 +180,7 @@ template <class _CharT>
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI void
-__escape(basic_string<_CharT>& __str, basic_string_view<_CharT> __values, __escape_quotation_mark __mark) {
+void __escape(basic_string<_CharT>& __str, basic_string_view<_CharT> __values, __escape_quotation_mark __mark) {
__unicode::__code_point_view<_CharT> __view{__values.begin(), __values.end()};
// When the first code unit has the property Grapheme_Extend=Yes it needs to
@@ -208,10 +204,9 @@ __escape(basic_string<_CharT>& __str, basic_string_view<_CharT> __values, __esca
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__format_escaped_char(_CharT __value,
- output_iterator<const _CharT&> auto __out_it,
- __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
+auto __format_escaped_char(_CharT __value,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
basic_string<_CharT> __str;
__str += _CharT('\'');
__formatter::__escape(__str, basic_string_view{std::addressof(__value), 1}, __escape_quotation_mark::__apostrophe);
@@ -220,10 +215,9 @@ __format_escaped_char(_CharT __value,
}
template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
-__format_escaped_string(basic_string_view<_CharT> __values,
- output_iterator<const _CharT&> auto __out_it,
- __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
+auto __format_escaped_string(basic_string_view<_CharT> __values,
+ output_iterator<const _CharT&> auto __out_it,
+ __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
basic_string<_CharT> __str;
__str += _CharT('"');
__formatter::__escape(__str, __values, __escape_quotation_mark::__double_quote);
diff --git a/libcxx/include/__functional/binary_negate.h b/libcxx/include/__functional/binary_negate.h
index f7784fb1f1f11b..6efcd447a634a3 100644
--- a/libcxx/include/__functional/binary_negate.h
+++ b/libcxx/include/__functional/binary_negate.h
@@ -29,17 +29,16 @@ class _LIBCPP_DEPRECATED_IN_CXX17 binary_negate
_Predicate __pred_;
public:
- _LIBCPP_HIDE_FROM_ABI explicit _LIBCPP_CONSTEXPR_SINCE_CXX14 binary_negate(const _Predicate& __pred)
- : __pred_(__pred) {}
+ explicit _LIBCPP_CONSTEXPR_SINCE_CXX14 binary_negate(const _Predicate& __pred) : __pred_(__pred) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(
- const typename _Predicate::first_argument_type& __x, const typename _Predicate::second_argument_type& __y) const {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const typename _Predicate::first_argument_type& __x,
+ const typename _Predicate::second_argument_type& __y) const {
return !__pred_(__x, __y);
}
};
template <class _Predicate>
-_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI binary_negate<_Predicate>
+_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 binary_negate<_Predicate>
not2(const _Predicate& __pred) {
return binary_negate<_Predicate>(__pred);
}
diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h
index cbe8660b821c1f..0cad8119335466 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -77,13 +77,12 @@ struct is_placeholder<placeholders::__ph<_Np> > : public integral_constant<int,
#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Uj>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp& __mu(reference_wrapper<_Tp> __t, _Uj&) {
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp& __mu(reference_wrapper<_Tp> __t, _Uj&) {
return __t.get();
}
template <class _Ti, class... _Uj, __enable_if_t<is_bind_expression<_Ti>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __invoke_result_t<_Ti&, _Uj...>
-__mu(_Ti& __ti, tuple<_Uj...>& __uj) {
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20 __invoke_result_t<_Ti&, _Uj...> __mu(_Ti& __ti, tuple<_Uj...>& __uj) {
return [&]<size_t... _Indices>(__index_sequence<_Indices...>) -> __invoke_result_t<_Ti&, _Uj...> {
return __ti(std::forward<_Uj>(std::get<_Indices>(__uj))...);
}(__index_sequence_for<_Uj...>{});
@@ -98,8 +97,7 @@ struct __mu_return2<true, _Ti, _Uj> {
};
template <class _Ti, class _Uj, __enable_if_t<0 < is_placeholder<_Ti>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-typename __mu_return2<0 < is_placeholder<_Ti>::value, _Ti, _Uj>::type
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __mu_return2<0 < is_placeholder<_Ti>::value, _Ti, _Uj>::type
__mu(_Ti&, _Uj& __uj) {
const size_t __indx = is_placeholder<_Ti>::value - 1;
return std::forward<typename tuple_element<__indx, _Uj>::type>(std::get<__indx>(__uj));
@@ -110,7 +108,7 @@ template <class _Ti,
__enable_if_t<!is_bind_expression<_Ti>::value && is_placeholder<_Ti>::value == 0 &&
!__is_reference_wrapper<_Ti>::value,
int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Ti& __mu(_Ti& __ti, _Uj&) {
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _Ti& __mu(_Ti& __ti, _Uj&) {
return __ti;
}
@@ -185,7 +183,7 @@ struct __bind_return<_Fp, const tuple<_BoundArgs...>, _TupleUj, true> {
};
template <class _Fp, class _BoundArgs, size_t... _Indx, class _Args>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __bind_return<_Fp, _BoundArgs, _Args>::type
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __bind_return<_Fp, _BoundArgs, _Args>::type
__apply_functor(_Fp& __f, _BoundArgs& __bound_args, __index_sequence<_Indx...>, _Args&& __args) {
return std::__invoke(__f, std::__mu(std::get<_Indx>(__bound_args), __args)...);
}
@@ -206,19 +204,18 @@ class __bind : public __weak_result_type<__decay_t<_Fp> > {
class... _BA,
__enable_if_t<is_constructible<_Fd, _Gp>::value && !is_same<__libcpp_remove_reference_t<_Gp>, __bind>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bind(_Gp&& __f, _BA&&... __bound_args)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bind(_Gp&& __f, _BA&&... __bound_args)
: __f_(std::forward<_Gp>(__f)), __bound_args_(std::forward<_BA>(__bound_args)...) {}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type
operator()(_Args&&... __args) {
return std::__apply_functor(
__f_, __bound_args_, __index_sequence_for<_BoundArgs...>(), tuple<_Args&&...>(std::forward<_Args>(__args)...));
}
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
operator()(_Args&&... __args) const {
return std::__apply_functor(
__f_, __bound_args_, __index_sequence_for<_BoundArgs...>(), tuple<_Args&&...>(std::forward<_Args>(__args)...));
@@ -242,7 +239,7 @@ class __bind_r : public __bind<_Fp, _BoundArgs...> {
class... _BA,
__enable_if_t<is_constructible<_Fd, _Gp>::value && !is_same<__libcpp_remove_reference_t<_Gp>, __bind_r>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bind_r(_Gp&& __f, _BA&&... __bound_args)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit __bind_r(_Gp&& __f, _BA&&... __bound_args)
: base(std::forward<_Gp>(__f), std::forward<_BA>(__bound_args)...) {}
template <
@@ -250,7 +247,7 @@ class __bind_r : public __bind<_Fp, _BoundArgs...> {
__enable_if_t<is_convertible<typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type, result_type>::value ||
is_void<_Rp>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 result_type operator()(_Args&&... __args) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 result_type operator()(_Args&&... __args) {
return std::__invoke_r<_Rp>(static_cast<base&>(*this), std::forward<_Args>(__args)...);
}
@@ -259,7 +256,7 @@ class __bind_r : public __bind<_Fp, _BoundArgs...> {
result_type>::value ||
is_void<_Rp>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 result_type operator()(_Args&&... __args) const {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 result_type operator()(_Args&&... __args) const {
return std::__invoke_r<_Rp>(static_cast<base const&>(*this), std::forward<_Args>(__args)...);
}
};
@@ -268,14 +265,14 @@ template <class _Rp, class _Fp, class... _BoundArgs>
struct is_bind_expression<__bind_r<_Rp, _Fp, _BoundArgs...> > : public true_type {};
template <class _Fp, class... _BoundArgs>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bind<_Fp, _BoundArgs...>
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX20 __bind<_Fp, _BoundArgs...>
bind(_Fp&& __f, _BoundArgs&&... __bound_args) {
typedef __bind<_Fp, _BoundArgs...> type;
return type(std::forward<_Fp>(__f), std::forward<_BoundArgs>(__bound_args)...);
}
template <class _Rp, class _Fp, class... _BoundArgs>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bind_r<_Rp, _Fp, _BoundArgs...>
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX20 __bind_r<_Rp, _Fp, _BoundArgs...>
bind(_Fp&& __f, _BoundArgs&&... __bound_args) {
typedef __bind_r<_Rp, _Fp, _BoundArgs...> type;
return type(std::forward<_Fp>(__f), std::forward<_BoundArgs>(__bound_args)...);
diff --git a/libcxx/include/__functional/bind_back.h b/libcxx/include/__functional/bind_back.h
index 41177144d81fe9..c813aa19a0abe5 100644
--- a/libcxx/include/__functional/bind_back.h
+++ b/libcxx/include/__functional/bind_back.h
@@ -32,7 +32,7 @@ struct __bind_back_op;
template <size_t _NBound, size_t... _Ip>
struct __bind_back_op<_NBound, index_sequence<_Ip...>> {
template <class _Fn, class _BoundArgs, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn&& __f, _BoundArgs&& __bound_args, _Args&&... __args) const
+ constexpr auto operator()(_Fn&& __f, _BoundArgs&& __bound_args, _Args&&... __args) const
noexcept(noexcept(std::invoke(std::forward<_Fn>(__f),
std::forward<_Args>(__args)...,
std::get<_Ip>(std::forward<_BoundArgs>(__bound_args))...)))
@@ -52,10 +52,10 @@ struct __bind_back_t : __perfect_forward<__bind_back_op<tuple_size_v<_BoundArgs>
template <class _Fn, class... _Args>
requires is_constructible_v<decay_t<_Fn>, _Fn> && is_move_constructible_v<decay_t<_Fn>> &&
- (is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
-_LIBCPP_HIDE_FROM_ABI constexpr auto __bind_back(_Fn&& __f, _Args&&... __args) noexcept(
- noexcept(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(
- std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...))))
+ (is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
+constexpr auto
+__bind_back(_Fn&& __f, _Args&&... __args) noexcept(noexcept(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(
+ std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...))))
-> decltype(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(
std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...))) {
return __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(
@@ -64,7 +64,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr auto __bind_back(_Fn&& __f, _Args&&... __args) n
# if _LIBCPP_STD_VER >= 23
template <class _Fn, class... _Args>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto bind_back(_Fn&& __f, _Args&&... __args) {
+[[nodiscard]] constexpr auto bind_back(_Fn&& __f, _Args&&... __args) {
static_assert(is_constructible_v<decay_t<_Fn>, _Fn>, "bind_back requires decay_t<F> to be constructible from F");
static_assert(is_move_constructible_v<decay_t<_Fn>>, "bind_back requires decay_t<F> to be move constructible");
static_assert((is_constructible_v<decay_t<_Args>, _Args> && ...),
diff --git a/libcxx/include/__functional/bind_front.h b/libcxx/include/__functional/bind_front.h
index 97f8f4c458702e..6a87e8fa2ea527 100644
--- a/libcxx/include/__functional/bind_front.h
+++ b/libcxx/include/__functional/bind_front.h
@@ -31,8 +31,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct __bind_front_op {
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const noexcept(
- noexcept(std::invoke(std::forward<_Args>(__args)...))) -> decltype(std::invoke(std::forward<_Args>(__args)...)) {
+ constexpr auto operator()(_Args&&... __args) const noexcept(noexcept(std::invoke(std::forward<_Args>(__args)...)))
+ -> decltype(std::invoke(std::forward<_Args>(__args)...)) {
return std::invoke(std::forward<_Args>(__args)...);
}
};
@@ -45,7 +45,7 @@ struct __bind_front_t : __perfect_forward<__bind_front_op, _Fn, _BoundArgs...> {
template <class _Fn, class... _Args>
requires is_constructible_v<decay_t<_Fn>, _Fn> && is_move_constructible_v<decay_t<_Fn>> &&
(is_constructible_v<decay_t<_Args>, _Args> && ...) && (is_move_constructible_v<decay_t<_Args>> && ...)
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto bind_front(_Fn&& __f, _Args&&... __args) {
+[[nodiscard]] constexpr auto bind_front(_Fn&& __f, _Args&&... __args) {
return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(std::forward<_Fn>(__f), std::forward<_Args>(__args)...);
}
@@ -61,7 +61,7 @@ struct __nttp_bind_front_t<_Fn, index_sequence<_Indices...>, _BoundArgs...> {
tuple<_BoundArgs...> __bound_args_;
template <class _Self, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(this _Self&& __self, _Args&&... __args) noexcept(noexcept(std::invoke(
+ constexpr auto operator()(this _Self&& __self, _Args&&... __args) noexcept(noexcept(std::invoke(
_Fn, std::get<_Indices>(std::forward<_Self>(__self).__bound_args_)..., std::forward<_Args>(__args)...)))
-> decltype(std::invoke(
_Fn, std::get<_Indices>(std::forward<_Self>(__self).__bound_args_)..., std::forward<_Args>(__args)...)) {
@@ -73,7 +73,7 @@ struct __nttp_bind_front_t<_Fn, index_sequence<_Indices...>, _BoundArgs...> {
template <auto _Fn>
struct __nttp_bind_without_bound_args_t {
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI static constexpr auto
+ static constexpr auto
operator()(_Args&&... __args) noexcept(noexcept(std::invoke(_Fn, std::forward<_Args>(__args)...)))
-> decltype(std::invoke(_Fn, std::forward<_Args>(__args)...)) {
return std::invoke(_Fn, std::forward<_Args>(__args)...);
@@ -81,7 +81,7 @@ struct __nttp_bind_without_bound_args_t {
};
template <auto _Fn, class... _Args>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto bind_front(_Args&&... __args) {
+[[nodiscard]] constexpr auto bind_front(_Args&&... __args) {
static_assert((is_constructible_v<decay_t<_Args>, _Args> && ...),
"bind_front requires all decay_t<Args> to be constructible from respective Args");
static_assert((is_move_constructible_v<decay_t<_Args>> && ...),
diff --git a/libcxx/include/__functional/binder1st.h b/libcxx/include/__functional/binder1st.h
index 023c8c6b8c35b4..6ba64e394335f6 100644
--- a/libcxx/include/__functional/binder1st.h
+++ b/libcxx/include/__functional/binder1st.h
@@ -22,28 +22,24 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Operation>
-class _LIBCPP_DEPRECATED_IN_CXX11 binder1st
- : public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> {
+class _LIBCPP_DEPRECATED_IN_CXX11
+binder1st : public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> {
protected:
_Operation op;
typename _Operation::first_argument_type value;
public:
- _LIBCPP_HIDE_FROM_ABI binder1st(const _Operation& __x, const typename _Operation::first_argument_type __y)
- : op(__x), value(__y) {}
- _LIBCPP_HIDE_FROM_ABI typename _Operation::result_type
- operator()(typename _Operation::second_argument_type& __x) const {
+ binder1st(const _Operation& __x, const typename _Operation::first_argument_type __y) : op(__x), value(__y) {}
+ typename _Operation::result_type operator()(typename _Operation::second_argument_type& __x) const {
return op(value, __x);
}
- _LIBCPP_HIDE_FROM_ABI typename _Operation::result_type
- operator()(const typename _Operation::second_argument_type& __x) const {
+ typename _Operation::result_type operator()(const typename _Operation::second_argument_type& __x) const {
return op(value, __x);
}
};
template <class _Operation, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI binder1st<_Operation>
-bind1st(const _Operation& __op, const _Tp& __x) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline binder1st<_Operation> bind1st(const _Operation& __op, const _Tp& __x) {
return binder1st<_Operation>(__op, __x);
}
diff --git a/libcxx/include/__functional/binder2nd.h b/libcxx/include/__functional/binder2nd.h
index e814c5dcbc7040..cd66be9ffb8ae1 100644
--- a/libcxx/include/__functional/binder2nd.h
+++ b/libcxx/include/__functional/binder2nd.h
@@ -22,28 +22,24 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Operation>
-class _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
- : public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> {
+class _LIBCPP_DEPRECATED_IN_CXX11
+binder2nd : public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> {
protected:
_Operation op;
typename _Operation::second_argument_type value;
public:
- _LIBCPP_HIDE_FROM_ABI binder2nd(const _Operation& __x, const typename _Operation::second_argument_type __y)
- : op(__x), value(__y) {}
- _LIBCPP_HIDE_FROM_ABI typename _Operation::result_type
- operator()(typename _Operation::first_argument_type& __x) const {
+ binder2nd(const _Operation& __x, const typename _Operation::second_argument_type __y) : op(__x), value(__y) {}
+ typename _Operation::result_type operator()(typename _Operation::first_argument_type& __x) const {
return op(__x, value);
}
- _LIBCPP_HIDE_FROM_ABI typename _Operation::result_type
- operator()(const typename _Operation::first_argument_type& __x) const {
+ typename _Operation::result_type operator()(const typename _Operation::first_argument_type& __x) const {
return op(__x, value);
}
};
template <class _Operation, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI binder2nd<_Operation>
-bind2nd(const _Operation& __op, const _Tp& __x) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline binder2nd<_Operation> bind2nd(const _Operation& __op, const _Tp& __x) {
return binder2nd<_Operation>(__op, __x);
}
diff --git a/libcxx/include/__functional/boyer_moore_searcher.h b/libcxx/include/__functional/boyer_moore_searcher.h
index 2f14cbd99eb22f..b9ad2bc4f95f86 100644
--- a/libcxx/include/__functional/boyer_moore_searcher.h
+++ b/libcxx/include/__functional/boyer_moore_searcher.h
@@ -46,13 +46,12 @@ class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, false> {
unordered_map<_Key, _Value, _Hash, _BinaryPredicate> __table_;
public:
- _LIBCPP_HIDE_FROM_ABI explicit _BMSkipTable(
- size_t __sz, value_type __default_value, _Hash __hash, _BinaryPredicate __pred)
+ explicit _BMSkipTable(size_t __sz, value_type __default_value, _Hash __hash, _BinaryPredicate __pred)
: __default_value_(__default_value), __table_(__sz, __hash, __pred) {}
- _LIBCPP_HIDE_FROM_ABI void insert(const key_type& __key, value_type __val) { __table_[__key] = __val; }
+ void insert(const key_type& __key, value_type __val) { __table_[__key] = __val; }
- _LIBCPP_HIDE_FROM_ABI value_type operator[](const key_type& __key) const {
+ value_type operator[](const key_type& __key) const {
auto __it = __table_.find(__key);
return __it == __table_.end() ? __default_value_ : __it->second;
}
@@ -70,20 +69,16 @@ class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, true> {
static_assert(numeric_limits<unsigned_key_type>::max() < 256);
public:
- _LIBCPP_HIDE_FROM_ABI explicit _BMSkipTable(size_t, value_type __default_value, _Hash, _BinaryPredicate) {
+ explicit _BMSkipTable(size_t, value_type __default_value, _Hash, _BinaryPredicate) {
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wmaybe-uninitialized")
std::fill_n(__table_.data(), __table_.size(), __default_value);
_LIBCPP_DIAGNOSTIC_POP
}
- _LIBCPP_HIDE_FROM_ABI void insert(key_type __key, value_type __val) {
- __table_[static_cast<unsigned_key_type>(__key)] = __val;
- }
+ void insert(key_type __key, value_type __val) { __table_[static_cast<unsigned_key_type>(__key)] = __val; }
- _LIBCPP_HIDE_FROM_ABI value_type operator[](key_type __key) const {
- return __table_[static_cast<unsigned_key_type>(__key)];
- }
+ value_type operator[](key_type __key) const { return __table_[static_cast<unsigned_key_type>(__key)]; }
};
template <class _RandomAccessIterator1,
@@ -102,11 +97,10 @@ class boyer_moore_searcher {
is_same_v<_BinaryPredicate, equal_to<>>>;
public:
- _LIBCPP_HIDE_FROM_ABI boyer_moore_searcher(
- _RandomAccessIterator1 __first,
- _RandomAccessIterator1 __last,
- _Hash __hash = _Hash(),
- _BinaryPredicate __pred = _BinaryPredicate())
+ boyer_moore_searcher(_RandomAccessIterator1 __first,
+ _RandomAccessIterator1 __last,
+ _Hash __hash = _Hash(),
+ _BinaryPredicate __pred = _BinaryPredicate())
: __first_(__first),
__last_(__last),
__pred_(__pred),
@@ -124,7 +118,7 @@ class boyer_moore_searcher {
}
template <class _RandomAccessIterator2>
- _LIBCPP_HIDE_FROM_ABI pair<_RandomAccessIterator2, _RandomAccessIterator2>
+ pair<_RandomAccessIterator2, _RandomAccessIterator2>
operator()(_RandomAccessIterator2 __first, _RandomAccessIterator2 __last) const {
static_assert(is_same_v<__remove_cvref_t<typename iterator_traits<_RandomAccessIterator1>::value_type>,
__remove_cvref_t<typename iterator_traits<_RandomAccessIterator2>::value_type>>,
@@ -148,7 +142,7 @@ class boyer_moore_searcher {
shared_ptr<difference_type[]> __suffix_;
template <class _RandomAccessIterator2>
- _LIBCPP_HIDE_FROM_ABI pair<_RandomAccessIterator2, _RandomAccessIterator2>
+ pair<_RandomAccessIterator2, _RandomAccessIterator2>
__search(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const {
_RandomAccessIterator2 __current = __f;
const _RandomAccessIterator2 __last = __l - __pattern_length_;
@@ -173,8 +167,7 @@ class boyer_moore_searcher {
}
template <class _Iterator, class _Container>
- _LIBCPP_HIDE_FROM_ABI void
- __compute_bm_prefix(_Iterator __first, _Iterator __last, _BinaryPredicate __pred, _Container& __prefix) {
+ void __compute_bm_prefix(_Iterator __first, _Iterator __last, _BinaryPredicate __pred, _Container& __prefix) {
const size_t __count = __last - __first;
__prefix[0] = 0;
@@ -190,8 +183,7 @@ class boyer_moore_searcher {
}
}
- _LIBCPP_HIDE_FROM_ABI void
- __build_suffix_table(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _BinaryPredicate __pred) {
+ void __build_suffix_table(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _BinaryPredicate __pred) {
const size_t __count = __last - __first;
if (__count == 0)
@@ -233,11 +225,10 @@ class boyer_moore_horspool_searcher {
is_same_v<_BinaryPredicate, equal_to<>>>;
public:
- _LIBCPP_HIDE_FROM_ABI boyer_moore_horspool_searcher(
- _RandomAccessIterator1 __first,
- _RandomAccessIterator1 __last,
- _Hash __hash = _Hash(),
- _BinaryPredicate __pred = _BinaryPredicate())
+ boyer_moore_horspool_searcher(_RandomAccessIterator1 __first,
+ _RandomAccessIterator1 __last,
+ _Hash __hash = _Hash(),
+ _BinaryPredicate __pred = _BinaryPredicate())
: __first_(__first),
__last_(__last),
__pred_(__pred),
@@ -255,7 +246,7 @@ class boyer_moore_horspool_searcher {
}
template <class _RandomAccessIterator2>
- _LIBCPP_HIDE_FROM_ABI pair<_RandomAccessIterator2, _RandomAccessIterator2>
+ pair<_RandomAccessIterator2, _RandomAccessIterator2>
operator()(_RandomAccessIterator2 __first, _RandomAccessIterator2 __last) const {
static_assert(is_same_v<__remove_cvref_t<typename std::iterator_traits<_RandomAccessIterator1>::value_type>,
__remove_cvref_t<typename std::iterator_traits<_RandomAccessIterator2>::value_type>>,
@@ -279,7 +270,7 @@ class boyer_moore_horspool_searcher {
shared_ptr<__skip_table_type> __skip_table_;
template <class _RandomAccessIterator2>
- _LIBCPP_HIDE_FROM_ABI pair<_RandomAccessIterator2, _RandomAccessIterator2>
+ pair<_RandomAccessIterator2, _RandomAccessIterator2>
__search(_RandomAccessIterator2 __f, _RandomAccessIterator2 __l) const {
_RandomAccessIterator2 __current = __f;
const _RandomAccessIterator2 __last = __l - __pattern_length_;
diff --git a/libcxx/include/__functional/compose.h b/libcxx/include/__functional/compose.h
index 20b30660b507bc..b0d7160c4ae34a 100644
--- a/libcxx/include/__functional/compose.h
+++ b/libcxx/include/__functional/compose.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct __compose_op {
template <class _Fn1, class _Fn2, class... _Args>
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn1&& __f1, _Fn2&& __f2, _Args&&... __args) const noexcept(noexcept(
+ constexpr auto operator()(_Fn1&& __f1, _Fn2&& __f2, _Args&&... __args) const noexcept(noexcept(
std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...))))
-> decltype(std::invoke(std::forward<_Fn1>(__f1),
std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...))) {
@@ -40,7 +40,7 @@ struct __compose_t : __perfect_forward<__compose_op, _Fn1, _Fn2> {
};
template <class _Fn1, class _Fn2>
-_LIBCPP_HIDE_FROM_ABI constexpr auto __compose(_Fn1&& __f1, _Fn2&& __f2) noexcept(
+constexpr auto __compose(_Fn1&& __f1, _Fn2&& __f2) noexcept(
noexcept(__compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2))))
-> decltype(__compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2))) {
return __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2));
diff --git a/libcxx/include/__functional/default_searcher.h b/libcxx/include/__functional/default_searcher.h
index afbf07e238b8c0..28c01f639ed29e 100644
--- a/libcxx/include/__functional/default_searcher.h
+++ b/libcxx/include/__functional/default_searcher.h
@@ -29,12 +29,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _BinaryPredicate = equal_to<>>
class default_searcher {
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+ _LIBCPP_CONSTEXPR_SINCE_CXX20
default_searcher(_ForwardIterator __f, _ForwardIterator __l, _BinaryPredicate __p = _BinaryPredicate())
: __first_(__f), __last_(__l), __pred_(__p) {}
template <typename _ForwardIterator2>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator2, _ForwardIterator2>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_ForwardIterator2, _ForwardIterator2>
operator()(_ForwardIterator2 __f, _ForwardIterator2 __l) const {
auto __proj = __identity();
return std::__search_impl(__f, __l, __first_, __last_, __pred_, __proj, __proj);
diff --git a/libcxx/include/__functional/function_ref_common.h b/libcxx/include/__functional/function_ref_common.h
index e6fa031432a916..7422b2f35fc11f 100644
--- a/libcxx/include/__functional/function_ref_common.h
+++ b/libcxx/include/__functional/function_ref_common.h
@@ -40,10 +40,10 @@ union __function_ref_storage {
void* __obj_ptr_;
void (*__fn_ptr_)();
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __function_ref_storage() noexcept : __obj_ptr_(nullptr) {}
+ constexpr explicit __function_ref_storage() noexcept : __obj_ptr_(nullptr) {}
template <class _Tp>
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __function_ref_storage(_Tp* __ptr) noexcept {
+ constexpr explicit __function_ref_storage(_Tp* __ptr) noexcept {
if constexpr (is_object_v<_Tp>) {
__obj_ptr_ = const_cast<remove_cv_t<_Tp>*>(__ptr);
} else {
@@ -53,7 +53,7 @@ union __function_ref_storage {
}
template <class _Tp>
- _LIBCPP_HIDE_FROM_ABI static constexpr auto __get(__function_ref_storage __storage) {
+ static constexpr auto __get(__function_ref_storage __storage) {
if constexpr (is_object_v<_Tp>) {
return static_cast<_Tp*>(__storage.__obj_ptr_);
} else {
diff --git a/libcxx/include/__functional/function_ref_impl.h b/libcxx/include/__functional/function_ref_impl.h
index b54d359853e9be..154d297ff3035e 100644
--- a/libcxx/include/__functional/function_ref_impl.h
+++ b/libcxx/include/__functional/function_ref_impl.h
@@ -90,7 +90,7 @@ class function_ref<_Rp(_ArgTypes...) _LIBCPP_FUNCTION_REF_CV noexcept(__is_noexc
public:
template <class _Fp>
requires is_function_v<_Fp> && __is_invocable_using<_Fp>
- _LIBCPP_HIDE_FROM_ABI function_ref(_Fp* __fn_ptr) noexcept
+ function_ref(_Fp* __fn_ptr) noexcept
: __storage_(__fn_ptr),
__call_([](__storage_t __storage, __arg_t<_ArgTypes>... __args) static noexcept(__is_noexcept) -> _Rp {
_Fp* __fn_ptr1 = __storage_t::template __get<_Fp>(__storage);
@@ -102,7 +102,7 @@ class function_ref<_Rp(_ArgTypes...) _LIBCPP_FUNCTION_REF_CV noexcept(__is_noexc
template <class _Fn, class _Tp = remove_reference_t<_Fn>>
requires(!is_same_v<remove_cvref_t<_Fn>, function_ref> && !is_member_pointer_v<_Tp> &&
__is_invocable_using<_LIBCPP_FUNCTION_REF_CV _Tp&> && !__is_convertible_from_specialization_v<_Tp>)
- _LIBCPP_HIDE_FROM_ABI constexpr function_ref(_Fn&& __obj) noexcept {
+ constexpr function_ref(_Fn&& __obj) noexcept {
using _Dn = remove_cv_t<_Tp>;
if constexpr (__statically_callable<_Dn, __arg_t<_ArgTypes>...>) {
__call_ = [](__storage_t, __arg_t<_ArgTypes>... __args) static noexcept(__is_noexcept) -> _Rp {
@@ -123,12 +123,11 @@ class function_ref<_Rp(_ArgTypes...) _LIBCPP_FUNCTION_REF_CV noexcept(__is_noexc
template <class _Fn, class _Tp = remove_reference_t<_Fn>>
requires(!is_same_v<remove_cvref_t<_Fn>, function_ref> && !is_member_pointer_v<_Tp> &&
__is_invocable_using<_LIBCPP_FUNCTION_REF_CV _Tp&> && __is_convertible_from_specialization_v<_Tp>)
- _LIBCPP_HIDE_FROM_ABI constexpr function_ref(_Fn&& __obj) noexcept
- : __storage_(__obj.__storage_), __call_(__obj.__call_) {}
+ constexpr function_ref(_Fn&& __obj) noexcept : __storage_(__obj.__storage_), __call_(__obj.__call_) {}
template <auto _Cw, class _Fn>
requires __is_invocable_using<const _Fn&>
- _LIBCPP_HIDE_FROM_ABI constexpr function_ref(constant_wrapper<_Cw, _Fn> __f) noexcept
+ constexpr function_ref(constant_wrapper<_Cw, _Fn> __f) noexcept
: __call_([](__storage_t, __arg_t<_ArgTypes>... __args) static noexcept(__is_noexcept) -> _Rp {
return std::invoke_r<_Rp>(decltype(__f)::value, std::forward<__arg_t<_ArgTypes>>(__args)...);
}) {
@@ -147,7 +146,7 @@ class function_ref<_Rp(_ArgTypes...) _LIBCPP_FUNCTION_REF_CV noexcept(__is_noexc
template <auto _Cw, class _Fn, class _Up, class _Tp = remove_reference_t<_Up>>
requires(!is_rvalue_reference_v<_Up &&>) && __is_invocable_using<const _Fn&, _LIBCPP_FUNCTION_REF_CV _Tp&>
- _LIBCPP_HIDE_FROM_ABI constexpr function_ref(constant_wrapper<_Cw, _Fn> __f, _Up&& __obj) noexcept
+ constexpr function_ref(constant_wrapper<_Cw, _Fn> __f, _Up&& __obj) noexcept
: __storage_(std::addressof(__obj)),
__call_([](__storage_t __storage, __arg_t<_ArgTypes>... __args) static noexcept(__is_noexcept) -> _Rp {
auto& __obj1 = static_cast<_LIBCPP_FUNCTION_REF_CV _Tp&>(*__storage_t::template __get<_Tp>(__storage));
@@ -160,8 +159,7 @@ class function_ref<_Rp(_ArgTypes...) _LIBCPP_FUNCTION_REF_CV noexcept(__is_noexc
template <auto _Cw, class _Fn, class _Tp>
requires __is_invocable_using<const _Fn&, _LIBCPP_FUNCTION_REF_CV _Tp*>
- _LIBCPP_HIDE_FROM_ABI constexpr function_ref(constant_wrapper<_Cw, _Fn> __f,
- _LIBCPP_FUNCTION_REF_CV _Tp* __obj_ptr) noexcept
+ constexpr function_ref(constant_wrapper<_Cw, _Fn> __f, _LIBCPP_FUNCTION_REF_CV _Tp* __obj_ptr) noexcept
: __storage_(__obj_ptr),
__call_([](__storage_t __storage, __arg_t<_ArgTypes>... __args) static noexcept(__is_noexcept) -> _Rp {
auto* __obj = __storage_t::template __get<_LIBCPP_FUNCTION_REF_CV _Tp>(__storage);
@@ -176,15 +174,15 @@ class function_ref<_Rp(_ArgTypes...) _LIBCPP_FUNCTION_REF_CV noexcept(__is_noexc
}
}
- _LIBCPP_HIDE_FROM_ABI constexpr function_ref(const function_ref&) noexcept = default;
+ constexpr function_ref(const function_ref&) noexcept = default;
- _LIBCPP_HIDE_FROM_ABI constexpr function_ref& operator=(const function_ref&) noexcept = default;
+ constexpr function_ref& operator=(const function_ref&) noexcept = default;
template <class _Tp>
requires(!__is_convertible_from_specialization_v<_Tp>) && (!is_pointer_v<_Tp>) && (!__is_constant_wrapper<_Tp>)
- _LIBCPP_HIDE_FROM_ABI function_ref& operator=(_Tp) = delete;
+ function_ref& operator=(_Tp) = delete;
- _LIBCPP_HIDE_FROM_ABI _Rp operator()(_ArgTypes... __args) const noexcept(__is_noexcept) {
+ _Rp operator()(_ArgTypes... __args) const noexcept(__is_noexcept) {
return __call_(__storage_, std::forward<_ArgTypes>(__args)...);
}
};
diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h
index c794f57356ae76..77728bbca49beb 100644
--- a/libcxx/include/__functional/hash.h
+++ b/libcxx/include/__functional/hash.h
@@ -34,7 +34,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Size>
-inline _LIBCPP_HIDE_FROM_ABI _Size __loadword(const void* __p) {
+inline _Size __loadword(const void* __p) {
_Size __r;
std::memcpy(std::addressof(__r), __p, sizeof(__r));
return __r;
@@ -53,8 +53,7 @@ struct __murmur2_or_cityhash;
template <class _Size>
struct __murmur2_or_cityhash<_Size, 32> {
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK _Size
- operator()(const void* __key, _Size __len) const {
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK _Size operator()(const void* __key, _Size __len) const {
// murmur2
const _Size __m = 0x5bd1e995;
const _Size __r = 24;
@@ -89,8 +88,7 @@ struct __murmur2_or_cityhash<_Size, 32> {
template <class _Size>
struct __murmur2_or_cityhash<_Size, 64> {
// cityhash64
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK _Size
- operator()(const void* __key, _Size __len) const {
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK _Size operator()(const void* __key, _Size __len) const {
const char* __s = static_cast<const char*>(__key);
if (__len <= 32) {
if (__len <= 16) {
@@ -137,17 +135,17 @@ struct __murmur2_or_cityhash<_Size, 64> {
static const _Size __k2 = 0x9ae16a3b2f90404fULL;
static const _Size __k3 = 0xc949d7c7509e6557ULL;
- _LIBCPP_HIDE_FROM_ABI static _Size __rotate(_Size __val, int __shift) {
+ static _Size __rotate(_Size __val, int __shift) {
return __shift == 0 ? __val : ((__val >> __shift) | (__val << (64 - __shift)));
}
- _LIBCPP_HIDE_FROM_ABI static _Size __rotate_by_at_least_1(_Size __val, int __shift) {
+ static _Size __rotate_by_at_least_1(_Size __val, int __shift) {
return (__val >> __shift) | (__val << (64 - __shift));
}
- _LIBCPP_HIDE_FROM_ABI static _Size __shift_mix(_Size __val) { return __val ^ (__val >> 47); }
+ static _Size __shift_mix(_Size __val) { return __val ^ (__val >> 47); }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _Size __hash_len_16(_Size __u, _Size __v) {
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _Size __hash_len_16(_Size __u, _Size __v) {
const _Size __mul = 0x9ddfea08eb382d69ULL;
_Size __a = (__u ^ __v) * __mul;
__a ^= (__a >> 47);
@@ -157,8 +155,7 @@ struct __murmur2_or_cityhash<_Size, 64> {
return __b;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _Size
- __hash_len_0_to_16(const char* __s, _Size __len) {
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _Size __hash_len_0_to_16(const char* __s, _Size __len) {
if (__len > 8) {
const _Size __a = std::__loadword<_Size>(__s);
const _Size __b = std::__loadword<_Size>(__s + __len - 8);
@@ -184,8 +181,7 @@ struct __murmur2_or_cityhash<_Size, 64> {
return __k2;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _Size
- __hash_len_17_to_32(const char* __s, _Size __len) {
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _Size __hash_len_17_to_32(const char* __s, _Size __len) {
const _Size __a = std::__loadword<_Size>(__s) * __k1;
const _Size __b = std::__loadword<_Size>(__s + 8);
const _Size __c = std::__loadword<_Size>(__s + __len - 8) * __k2;
@@ -196,7 +192,7 @@ struct __murmur2_or_cityhash<_Size, 64> {
// Return a 16-byte hash for 48 bytes. Quick and dirty.
// Callers do best to use "random-looking" values for a and b.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _PairT
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _PairT
__weak_hash_len_32_with_seeds(_Size __w, _Size __x, _Size __y, _Size __z, _Size __a, _Size __b) {
__a += __w;
__b = __rotate(__b + __a + __z, 21);
@@ -211,7 +207,7 @@ struct __murmur2_or_cityhash<_Size, 64> {
}
// Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _PairT
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _PairT
__weak_hash_len_32_with_seeds(const char* __s, _Size __a, _Size __b) {
return __weak_hash_len_32_with_seeds(
std::__loadword<_Size>(__s),
@@ -223,8 +219,7 @@ struct __murmur2_or_cityhash<_Size, 64> {
}
// Return an 8-byte hash for 33 to 64 bytes.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _Size
- __hash_len_33_to_64(const char* __s, size_t __len) {
+ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK static _Size __hash_len_33_to_64(const char* __s, size_t __len) {
_Size __z = std::__loadword<_Size>(__s + 24);
_Size __a = std::__loadword<_Size>(__s) + (__len + std::__loadword<_Size>(__s + __len - 16)) * __k0;
_Size __b = __rotate(__a + __z, 52);
@@ -253,7 +248,7 @@ _LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
[[__gnu__::__pure__]] _LIBCPP_EXPORTED_FROM_ABI size_t __hash_memory(_LIBCPP_NOESCAPE const void*, size_t) _NOEXCEPT;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
#else
-_LIBCPP_HIDE_FROM_ABI inline size_t __hash_memory(const void* __ptr, size_t __size) _NOEXCEPT {
+inline size_t __hash_memory(const void* __ptr, size_t __size) _NOEXCEPT {
return __murmur2_or_cityhash<size_t>()(__ptr, __size);
}
#endif
@@ -263,7 +258,7 @@ struct __scalar_hash;
template <class _Tp>
struct __scalar_hash<_Tp, 0> : public __unary_function<_Tp, size_t> {
- _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT {
+ size_t operator()(_Tp __v) const _NOEXCEPT {
union {
_Tp __t;
size_t __a;
@@ -276,7 +271,7 @@ struct __scalar_hash<_Tp, 0> : public __unary_function<_Tp, size_t> {
template <class _Tp>
struct __scalar_hash<_Tp, 1> : public __unary_function<_Tp, size_t> {
- _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT {
+ size_t operator()(_Tp __v) const _NOEXCEPT {
union {
_Tp __t;
size_t __a;
@@ -288,7 +283,7 @@ struct __scalar_hash<_Tp, 1> : public __unary_function<_Tp, size_t> {
template <class _Tp>
struct __scalar_hash<_Tp, 2> : public __unary_function<_Tp, size_t> {
- _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT {
+ size_t operator()(_Tp __v) const _NOEXCEPT {
union {
_Tp __t;
struct {
@@ -303,7 +298,7 @@ struct __scalar_hash<_Tp, 2> : public __unary_function<_Tp, size_t> {
template <class _Tp>
struct __scalar_hash<_Tp, 3> : public __unary_function<_Tp, size_t> {
- _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT {
+ size_t operator()(_Tp __v) const _NOEXCEPT {
union {
_Tp __t;
struct {
@@ -319,7 +314,7 @@ struct __scalar_hash<_Tp, 3> : public __unary_function<_Tp, size_t> {
template <class _Tp>
struct __scalar_hash<_Tp, 4> : public __unary_function<_Tp, size_t> {
- _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT {
+ size_t operator()(_Tp __v) const _NOEXCEPT {
union {
_Tp __t;
struct {
@@ -334,7 +329,7 @@ struct __scalar_hash<_Tp, 4> : public __unary_function<_Tp, size_t> {
}
};
-_LIBCPP_HIDE_FROM_ABI inline size_t __hash_combine(size_t __lhs, size_t __rhs) _NOEXCEPT {
+inline size_t __hash_combine(size_t __lhs, size_t __rhs) _NOEXCEPT {
typedef __scalar_hash<_PairT> _HashT;
const _PairT __p = {__lhs, __rhs};
return _HashT()(__p);
@@ -342,7 +337,7 @@ _LIBCPP_HIDE_FROM_ABI inline size_t __hash_combine(size_t __lhs, size_t __rhs) _
template <class _Tp>
struct hash<_Tp*> : public __unary_function<_Tp*, size_t> {
- _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp* __v) const _NOEXCEPT {
+ size_t operator()(_Tp* __v) const _NOEXCEPT {
union {
_Tp* __t;
size_t __a;
@@ -362,7 +357,7 @@ struct __hash_impl {
template <class _Tp>
struct __hash_impl<_Tp, __enable_if_t<is_enum<_Tp>::value && __is_unqualified_v<_Tp> > >
: __unary_function<_Tp, size_t> {
- _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT {
+ size_t operator()(_Tp __v) const _NOEXCEPT {
using type = __underlying_type_t<_Tp>;
return hash<type>()(static_cast<type>(__v));
}
@@ -373,7 +368,7 @@ struct __hash_impl<
_Tp,
__enable_if_t<is_integral<_Tp>::value && __is_unqualified_v<_Tp> && (sizeof(_Tp) <= sizeof(size_t))> >
: __unary_function<_Tp, size_t> {
- _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
+ size_t operator()(_Tp __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
template <class _Tp>
@@ -384,7 +379,7 @@ struct __hash_impl<_Tp,
template <class _Tp>
struct __hash_impl<_Tp, __enable_if_t<is_floating_point<_Tp>::value && __is_unqualified_v<_Tp> > >
: __scalar_hash<_Tp> {
- _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT {
+ size_t operator()(_Tp __v) const _NOEXCEPT {
// -0.0 and 0.0 should return same hash
if (__v == 0.0f)
return 0;
@@ -394,7 +389,7 @@ struct __hash_impl<_Tp, __enable_if_t<is_floating_point<_Tp>::value && __is_unqu
template <>
struct __hash_impl<long double> : __scalar_hash<long double> {
- _LIBCPP_HIDE_FROM_ABI size_t operator()(long double __v) const _NOEXCEPT {
+ size_t operator()(long double __v) const _NOEXCEPT {
// -0.0 and 0.0 should return same hash
if (__v == 0.0L)
return 0;
@@ -439,7 +434,7 @@ struct hash : public __hash_impl<_Tp> {};
template <>
struct hash<nullptr_t> : public __unary_function<nullptr_t, size_t> {
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI size_t operator()(nullptr_t) const _NOEXCEPT { return 662607004ull; }
+ [[__nodiscard__]] size_t operator()(nullptr_t) const _NOEXCEPT { return 662607004ull; }
};
#ifndef _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__functional/identity.h b/libcxx/include/__functional/identity.h
index 02dde2b4f323d2..b06e7d9f961b89 100644
--- a/libcxx/include/__functional/identity.h
+++ b/libcxx/include/__functional/identity.h
@@ -26,7 +26,7 @@ struct __is_identity : false_type {};
struct __identity {
template <class _Tp>
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp&& operator()(_Tp&& __t) const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR _Tp&& operator()(_Tp&& __t) const _NOEXCEPT {
return std::forward<_Tp>(__t);
}
@@ -44,7 +44,7 @@ struct __is_identity<reference_wrapper<const __identity> > : true_type {};
struct identity {
template <class _Tp>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp&& operator()(_LIBCPP_LIFETIMEBOUND _Tp&& __t) const noexcept {
+ [[nodiscard]] constexpr _Tp&& operator()(_LIBCPP_LIFETIMEBOUND _Tp&& __t) const noexcept {
return std::forward<_Tp>(__t);
}
diff --git a/libcxx/include/__functional/invoke.h b/libcxx/include/__functional/invoke.h
index f7d6a23a4e520d..d06643533858c6 100644
--- a/libcxx/include/__functional/invoke.h
+++ b/libcxx/include/__functional/invoke.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Fn, class... _Args>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 invoke_result_t<_Fn, _Args...>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 invoke_result_t<_Fn, _Args...>
invoke(_Fn&& __f, _Args&&... __args) noexcept(is_nothrow_invocable_v<_Fn, _Args...>) {
return std::__invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)...);
}
@@ -32,8 +32,7 @@ invoke(_Fn&& __f, _Args&&... __args) noexcept(is_nothrow_invocable_v<_Fn, _Args.
# if _LIBCPP_STD_VER >= 23
template <class _Result, class _Fn, class... _Args>
requires is_invocable_r_v<_Result, _Fn, _Args...>
-_LIBCPP_HIDE_FROM_ABI constexpr _Result
-invoke_r(_Fn&& __f, _Args&&... __args) noexcept(is_nothrow_invocable_r_v<_Result, _Fn, _Args...>) {
+constexpr _Result invoke_r(_Fn&& __f, _Args&&... __args) noexcept(is_nothrow_invocable_r_v<_Result, _Fn, _Args...>) {
if constexpr (is_void_v<_Result>) {
static_cast<void>(std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)...));
} else {
diff --git a/libcxx/include/__functional/mem_fn.h b/libcxx/include/__functional/mem_fn.h
index 1c9340c4f41831..3494aaa0340d84 100644
--- a/libcxx/include/__functional/mem_fn.h
+++ b/libcxx/include/__functional/mem_fn.h
@@ -32,19 +32,18 @@ class __mem_fn : public __weak_result_type<_Tp> {
type __f_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __mem_fn(type __f) _NOEXCEPT : __f_(__f) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 __mem_fn(type __f) _NOEXCEPT : __f_(__f) {}
// invoke
template <class... _ArgTypes>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __invoke_result_t<const _Tp&, _ArgTypes...>
- operator()(_ArgTypes&&... __args) const _NOEXCEPT_(__is_nothrow_invocable_v<const _Tp&, _ArgTypes...>) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 __invoke_result_t<const _Tp&, _ArgTypes...> operator()(_ArgTypes&&... __args) const
+ _NOEXCEPT_(__is_nothrow_invocable_v<const _Tp&, _ArgTypes...>) {
return std::__invoke(__f_, std::forward<_ArgTypes>(__args)...);
}
};
template <class _Rp, class _Tp>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __mem_fn<_Rp _Tp::*>
-mem_fn(_Rp _Tp::* __pm) _NOEXCEPT {
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX20 __mem_fn<_Rp _Tp::*> mem_fn(_Rp _Tp::* __pm) _NOEXCEPT {
return __mem_fn<_Rp _Tp::*>(__pm);
}
diff --git a/libcxx/include/__functional/mem_fun_ref.h b/libcxx/include/__functional/mem_fun_ref.h
index bfae51454ec51b..dcda16060fc35a 100644
--- a/libcxx/include/__functional/mem_fun_ref.h
+++ b/libcxx/include/__functional/mem_fun_ref.h
@@ -27,8 +27,8 @@ class _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_t : public __unary_function<_Tp*, _Sp>
_Sp (_Tp::*__p_)();
public:
- _LIBCPP_HIDE_FROM_ABI explicit mem_fun_t(_Sp (_Tp::*__p)()) : __p_(__p) {}
- _LIBCPP_HIDE_FROM_ABI _Sp operator()(_Tp* __p) const { return (__p->*__p_)(); }
+ explicit mem_fun_t(_Sp (_Tp::*__p)()) : __p_(__p) {}
+ _Sp operator()(_Tp* __p) const { return (__p->*__p_)(); }
};
template <class _Sp, class _Tp, class _Ap>
@@ -36,17 +36,17 @@ class _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_t : public __binary_function<_Tp*, _A
_Sp (_Tp::*__p_)(_Ap);
public:
- _LIBCPP_HIDE_FROM_ABI explicit mem_fun1_t(_Sp (_Tp::*__p)(_Ap)) : __p_(__p) {}
- _LIBCPP_HIDE_FROM_ABI _Sp operator()(_Tp* __p, _Ap __x) const { return (__p->*__p_)(__x); }
+ explicit mem_fun1_t(_Sp (_Tp::*__p)(_Ap)) : __p_(__p) {}
+ _Sp operator()(_Tp* __p, _Ap __x) const { return (__p->*__p_)(__x); }
};
template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI mem_fun_t<_Sp, _Tp> mem_fun(_Sp (_Tp::*__f)()) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline mem_fun_t<_Sp, _Tp> mem_fun(_Sp (_Tp::*__f)()) {
return mem_fun_t<_Sp, _Tp>(__f);
}
template <class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI mem_fun1_t<_Sp, _Tp, _Ap> mem_fun(_Sp (_Tp::*__f)(_Ap)) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline mem_fun1_t<_Sp, _Tp, _Ap> mem_fun(_Sp (_Tp::*__f)(_Ap)) {
return mem_fun1_t<_Sp, _Tp, _Ap>(__f);
}
@@ -55,8 +55,8 @@ class _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_ref_t : public __unary_function<_Tp, _
_Sp (_Tp::*__p_)();
public:
- _LIBCPP_HIDE_FROM_ABI explicit mem_fun_ref_t(_Sp (_Tp::*__p)()) : __p_(__p) {}
- _LIBCPP_HIDE_FROM_ABI _Sp operator()(_Tp& __p) const { return (__p.*__p_)(); }
+ explicit mem_fun_ref_t(_Sp (_Tp::*__p)()) : __p_(__p) {}
+ _Sp operator()(_Tp& __p) const { return (__p.*__p_)(); }
};
template <class _Sp, class _Tp, class _Ap>
@@ -64,18 +64,17 @@ class _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_ref_t : public __binary_function<_Tp,
_Sp (_Tp::*__p_)(_Ap);
public:
- _LIBCPP_HIDE_FROM_ABI explicit mem_fun1_ref_t(_Sp (_Tp::*__p)(_Ap)) : __p_(__p) {}
- _LIBCPP_HIDE_FROM_ABI _Sp operator()(_Tp& __p, _Ap __x) const { return (__p.*__p_)(__x); }
+ explicit mem_fun1_ref_t(_Sp (_Tp::*__p)(_Ap)) : __p_(__p) {}
+ _Sp operator()(_Tp& __p, _Ap __x) const { return (__p.*__p_)(__x); }
};
template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI mem_fun_ref_t<_Sp, _Tp> mem_fun_ref(_Sp (_Tp::*__f)()) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline mem_fun_ref_t<_Sp, _Tp> mem_fun_ref(_Sp (_Tp::*__f)()) {
return mem_fun_ref_t<_Sp, _Tp>(__f);
}
template <class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI mem_fun1_ref_t<_Sp, _Tp, _Ap>
-mem_fun_ref(_Sp (_Tp::*__f)(_Ap)) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline mem_fun1_ref_t<_Sp, _Tp, _Ap> mem_fun_ref(_Sp (_Tp::*__f)(_Ap)) {
return mem_fun1_ref_t<_Sp, _Tp, _Ap>(__f);
}
@@ -84,8 +83,8 @@ class _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t : public __unary_function<cons
_Sp (_Tp::*__p_)() const;
public:
- _LIBCPP_HIDE_FROM_ABI explicit const_mem_fun_t(_Sp (_Tp::*__p)() const) : __p_(__p) {}
- _LIBCPP_HIDE_FROM_ABI _Sp operator()(const _Tp* __p) const { return (__p->*__p_)(); }
+ explicit const_mem_fun_t(_Sp (_Tp::*__p)() const) : __p_(__p) {}
+ _Sp operator()(const _Tp* __p) const { return (__p->*__p_)(); }
};
template <class _Sp, class _Tp, class _Ap>
@@ -93,18 +92,17 @@ class _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t : public __binary_function<co
_Sp (_Tp::*__p_)(_Ap) const;
public:
- _LIBCPP_HIDE_FROM_ABI explicit const_mem_fun1_t(_Sp (_Tp::*__p)(_Ap) const) : __p_(__p) {}
- _LIBCPP_HIDE_FROM_ABI _Sp operator()(const _Tp* __p, _Ap __x) const { return (__p->*__p_)(__x); }
+ explicit const_mem_fun1_t(_Sp (_Tp::*__p)(_Ap) const) : __p_(__p) {}
+ _Sp operator()(const _Tp* __p, _Ap __x) const { return (__p->*__p_)(__x); }
};
template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI const_mem_fun_t<_Sp, _Tp> mem_fun(_Sp (_Tp::*__f)() const) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline const_mem_fun_t<_Sp, _Tp> mem_fun(_Sp (_Tp::*__f)() const) {
return const_mem_fun_t<_Sp, _Tp>(__f);
}
template <class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI const_mem_fun1_t<_Sp, _Tp, _Ap>
-mem_fun(_Sp (_Tp::*__f)(_Ap) const) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline const_mem_fun1_t<_Sp, _Tp, _Ap> mem_fun(_Sp (_Tp::*__f)(_Ap) const) {
return const_mem_fun1_t<_Sp, _Tp, _Ap>(__f);
}
@@ -113,8 +111,8 @@ class _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_ref_t : public __unary_function<
_Sp (_Tp::*__p_)() const;
public:
- _LIBCPP_HIDE_FROM_ABI explicit const_mem_fun_ref_t(_Sp (_Tp::*__p)() const) : __p_(__p) {}
- _LIBCPP_HIDE_FROM_ABI _Sp operator()(const _Tp& __p) const { return (__p.*__p_)(); }
+ explicit const_mem_fun_ref_t(_Sp (_Tp::*__p)() const) : __p_(__p) {}
+ _Sp operator()(const _Tp& __p) const { return (__p.*__p_)(); }
};
template <class _Sp, class _Tp, class _Ap>
@@ -122,19 +120,17 @@ class _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t : public __binary_functio
_Sp (_Tp::*__p_)(_Ap) const;
public:
- _LIBCPP_HIDE_FROM_ABI explicit const_mem_fun1_ref_t(_Sp (_Tp::*__p)(_Ap) const) : __p_(__p) {}
- _LIBCPP_HIDE_FROM_ABI _Sp operator()(const _Tp& __p, _Ap __x) const { return (__p.*__p_)(__x); }
+ explicit const_mem_fun1_ref_t(_Sp (_Tp::*__p)(_Ap) const) : __p_(__p) {}
+ _Sp operator()(const _Tp& __p, _Ap __x) const { return (__p.*__p_)(__x); }
};
template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI const_mem_fun_ref_t<_Sp, _Tp>
-mem_fun_ref(_Sp (_Tp::*__f)() const) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline const_mem_fun_ref_t<_Sp, _Tp> mem_fun_ref(_Sp (_Tp::*__f)() const) {
return const_mem_fun_ref_t<_Sp, _Tp>(__f);
}
template <class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI const_mem_fun1_ref_t<_Sp, _Tp, _Ap>
-mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline const_mem_fun1_ref_t<_Sp, _Tp, _Ap> mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const) {
return const_mem_fun1_ref_t<_Sp, _Tp, _Ap>(__f);
}
diff --git a/libcxx/include/__functional/not_fn.h b/libcxx/include/__functional/not_fn.h
index e6f14be799db33..a56b79573fdb50 100644
--- a/libcxx/include/__functional/not_fn.h
+++ b/libcxx/include/__functional/not_fn.h
@@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct __not_fn_op {
template <class... _Args>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 auto operator()(_Args&&... __args) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 auto operator()(_Args&&... __args) const
noexcept(noexcept(!std::invoke(std::forward<_Args>(__args)...)))
-> decltype(!std::invoke(std::forward<_Args>(__args)...)) {
return !std::invoke(std::forward<_Args>(__args)...);
@@ -44,7 +44,7 @@ struct __not_fn_t : __perfect_forward<__not_fn_op, _Fn> {
template <class _Fn,
class = enable_if_t< is_constructible_v<decay_t<_Fn>, _Fn> && is_move_constructible_v<decay_t<_Fn>> >>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 auto not_fn(_Fn&& __f) {
+_LIBCPP_CONSTEXPR_SINCE_CXX20 auto not_fn(_Fn&& __f) {
return __not_fn_t<decay_t<_Fn>>(std::forward<_Fn>(__f));
}
@@ -55,7 +55,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 auto not_fn(_Fn&& __f) {
template <auto _Fn>
struct __nttp_not_fn_t {
template <class... _Args>
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const
+ [[__nodiscard__]] constexpr auto operator()(_Args&&... __args) const
noexcept(noexcept(!std::invoke(_Fn, std::forward<_Args>(__args)...)))
-> decltype(!std::invoke(_Fn, std::forward<_Args>(__args)...)) {
return !std::invoke(_Fn, std::forward<_Args>(__args)...);
@@ -63,7 +63,7 @@ struct __nttp_not_fn_t {
};
template <auto _Fn>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI constexpr auto not_fn() noexcept {
+[[__nodiscard__]] constexpr auto not_fn() noexcept {
if constexpr (using _Ty = decltype(_Fn); is_pointer_v<_Ty> || is_member_pointer_v<_Ty>)
static_assert(_Fn != nullptr, "f cannot be equal to nullptr");
return __nttp_not_fn_t<_Fn>();
diff --git a/libcxx/include/__functional/operations.h b/libcxx/include/__functional/operations.h
index 7a80dce648fa17..371e5c18211c2d 100644
--- a/libcxx/include/__functional/operations.h
+++ b/libcxx/include/__functional/operations.h
@@ -35,9 +35,7 @@ template <class _Tp>
#endif
struct plus : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x + __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(plus);
@@ -53,7 +51,7 @@ inline const bool __desugars_to_v<__plus_tag, plus<void>, _Tp, _Up> = true;
template <>
struct plus<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) + std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) + std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) + std::forward<_T2>(__u);
@@ -69,9 +67,7 @@ template <class _Tp>
#endif
struct minus : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x - __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus);
@@ -79,7 +75,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus);
template <>
struct minus<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) - std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) - std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) - std::forward<_T2>(__u);
@@ -95,9 +91,7 @@ template <class _Tp>
#endif
struct multiplies : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x * __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies);
@@ -105,7 +99,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies);
template <>
struct multiplies<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) * std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) * std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) * std::forward<_T2>(__u);
@@ -121,9 +115,7 @@ template <class _Tp>
#endif
struct divides : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x / __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides);
@@ -131,7 +123,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides);
template <>
struct divides<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) / std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) / std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) / std::forward<_T2>(__u);
@@ -147,9 +139,7 @@ template <class _Tp>
#endif
struct modulus : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x % __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus);
@@ -157,7 +147,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus);
template <>
struct modulus<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) % std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) % std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) % std::forward<_T2>(__u);
@@ -173,7 +163,7 @@ template <class _Tp>
#endif
struct negate : __unary_function<_Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const { return -__x; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp operator()(const _Tp& __x) const { return -__x; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);
@@ -181,8 +171,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);
template <>
struct negate<void> {
template <class _Tp>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
- noexcept(noexcept(-std::forward<_Tp>(__x))) //
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_Tp&& __x) const noexcept(noexcept(-std::forward<_Tp>(__x))) //
-> decltype(-std::forward<_Tp>(__x)) {
return -std::forward<_Tp>(__x);
}
@@ -199,9 +188,7 @@ template <class _Tp>
#endif
struct bit_and : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x & __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x & __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and);
@@ -209,9 +196,9 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and);
template <>
struct bit_and<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) &
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) & std::forward<_T2>(__u)) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
+ noexcept(noexcept(std::forward<_T1>(__t) & std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) & std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) & std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -221,15 +208,14 @@ struct bit_and<void> {
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
struct bit_not : __unary_function<_Tp, _Tp> {
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const { return ~__x; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp operator()(const _Tp& __x) const { return ~__x; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_not);
template <>
struct bit_not<void> {
template <class _Tp>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
- noexcept(noexcept(~std::forward<_Tp>(__x))) //
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_Tp&& __x) const noexcept(noexcept(~std::forward<_Tp>(__x))) //
-> decltype(~std::forward<_Tp>(__x)) {
return ~std::forward<_Tp>(__x);
}
@@ -244,9 +230,7 @@ template <class _Tp>
#endif
struct bit_or : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x | __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x | __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or);
@@ -254,7 +238,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or);
template <>
struct bit_or<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) | std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) | std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) | std::forward<_T2>(__u);
@@ -270,9 +254,7 @@ template <class _Tp>
#endif
struct bit_xor : __binary_function<_Tp, _Tp, _Tp> {
typedef _Tp __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x, const _Tp& __y) const {
- return __x ^ __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x ^ __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);
@@ -280,7 +262,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);
template <>
struct bit_xor<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) ^ std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) ^ std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) ^ std::forward<_T2>(__u);
@@ -298,9 +280,7 @@ template <class _Tp>
#endif
struct equal_to : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x == __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to);
@@ -308,7 +288,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to);
template <>
struct equal_to<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) == std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) == std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) == std::forward<_T2>(__u);
@@ -333,9 +313,7 @@ template <class _Tp>
#endif
struct not_equal_to : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x != __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to);
@@ -343,7 +321,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to);
template <>
struct not_equal_to<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) != std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) != std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) != std::forward<_T2>(__u);
@@ -355,9 +333,7 @@ struct not_equal_to<void> {
template <class _Tp>
struct less : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x < __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less);
@@ -371,7 +347,7 @@ inline const bool __desugars_to_v<__totally_ordered_less_tag, less<_Tp>, _Tp, _T
template <>
struct less<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) < std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) < std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) < std::forward<_T2>(__u);
@@ -401,9 +377,7 @@ template <class _Tp>
#endif
struct less_equal : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x <= __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal);
@@ -411,7 +385,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal);
template <>
struct less_equal<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) <= std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) <= std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) <= std::forward<_T2>(__u);
@@ -427,9 +401,7 @@ template <class _Tp>
#endif
struct greater_equal : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x >= __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal);
@@ -437,9 +409,9 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal);
template <>
struct greater_equal<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
- noexcept(noexcept(std::forward<_T1>(__t) >=
- std::forward<_T2>(__u))) -> decltype(std::forward<_T1>(__t) >= std::forward<_T2>(__u)) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
+ noexcept(noexcept(std::forward<_T1>(__t) >= std::forward<_T2>(__u)))
+ -> decltype(std::forward<_T1>(__t) >= std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) >= std::forward<_T2>(__u);
}
typedef void is_transparent;
@@ -453,9 +425,7 @@ template <class _Tp>
#endif
struct greater : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x > __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater);
@@ -466,7 +436,7 @@ inline const bool __desugars_to_v<__greater_tag, greater<_Tp>, _Tp, _Tp> = true;
template <>
struct greater<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) > std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) > std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) > std::forward<_T2>(__u);
@@ -495,9 +465,7 @@ template <class _Tp>
#endif
struct logical_and : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x && __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and);
@@ -505,7 +473,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and);
template <>
struct logical_and<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) && std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) && std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) && std::forward<_T2>(__u);
@@ -521,7 +489,7 @@ template <class _Tp>
#endif
struct logical_not : __unary_function<_Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x) const { return !__x; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __x) const { return !__x; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not);
@@ -529,8 +497,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not);
template <>
struct logical_not<void> {
template <class _Tp>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
- noexcept(noexcept(!std::forward<_Tp>(__x))) //
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_Tp&& __x) const noexcept(noexcept(!std::forward<_Tp>(__x))) //
-> decltype(!std::forward<_Tp>(__x)) {
return !std::forward<_Tp>(__x);
}
@@ -545,9 +512,7 @@ template <class _Tp>
#endif
struct logical_or : __binary_function<_Tp, _Tp, bool> {
typedef bool __result_type; // used by valarray
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __x, const _Tp& __y) const {
- return __x || __y;
- }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or);
@@ -555,7 +520,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or);
template <>
struct logical_or<void> {
template <class _T1, class _T2>
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 auto operator()(_T1&& __t, _T2&& __u) const
noexcept(noexcept(std::forward<_T1>(__t) || std::forward<_T2>(__u))) //
-> decltype(std::forward<_T1>(__t) || std::forward<_T2>(__u)) {
return std::forward<_T1>(__t) || std::forward<_T2>(__u);
diff --git a/libcxx/include/__functional/perfect_forward.h b/libcxx/include/__functional/perfect_forward.h
index c0408b410e2f95..3768a635e89fbd 100644
--- a/libcxx/include/__functional/perfect_forward.h
+++ b/libcxx/include/__functional/perfect_forward.h
@@ -42,17 +42,17 @@ struct __perfect_forward_impl<_Op, index_sequence<_Idx...>, _BoundArgs...> {
public:
template <class... _Args, class = enable_if_t< is_constructible_v<tuple<_BoundArgs...>, _Args&&...> >>
- _LIBCPP_HIDE_FROM_ABI explicit constexpr __perfect_forward_impl(_Args&&... __bound_args)
+ explicit constexpr __perfect_forward_impl(_Args&&... __bound_args)
: __bound_args_(std::forward<_Args>(__bound_args)...) {}
- _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl(__perfect_forward_impl const&) = default;
- _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl(__perfect_forward_impl&&) = default;
+ __perfect_forward_impl(__perfect_forward_impl const&) = default;
+ __perfect_forward_impl(__perfect_forward_impl&&) = default;
- _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl& operator=(__perfect_forward_impl const&) = default;
- _LIBCPP_HIDE_FROM_ABI __perfect_forward_impl& operator=(__perfect_forward_impl&&) = default;
+ __perfect_forward_impl& operator=(__perfect_forward_impl const&) = default;
+ __perfect_forward_impl& operator=(__perfect_forward_impl&&) = default;
template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs&..., _Args...>>>
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) & noexcept(
+ constexpr auto operator()(_Args&&... __args) & noexcept(
noexcept(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)))
-> decltype(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)) {
return _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...);
@@ -62,7 +62,7 @@ struct __perfect_forward_impl<_Op, index_sequence<_Idx...>, _BoundArgs...> {
auto operator()(_Args&&...) & = delete;
template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs const&..., _Args...>>>
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const& noexcept(
+ constexpr auto operator()(_Args&&... __args) const& noexcept(
noexcept(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)))
-> decltype(_Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...)) {
return _Op()(std::get<_Idx>(__bound_args_)..., std::forward<_Args>(__args)...);
@@ -72,7 +72,7 @@ struct __perfect_forward_impl<_Op, index_sequence<_Idx...>, _BoundArgs...> {
auto operator()(_Args&&...) const& = delete;
template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs..., _Args...>>>
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) && noexcept(
+ constexpr auto operator()(_Args&&... __args) && noexcept(
noexcept(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)))
-> decltype(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)) {
return _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...);
@@ -82,7 +82,7 @@ struct __perfect_forward_impl<_Op, index_sequence<_Idx...>, _BoundArgs...> {
auto operator()(_Args&&...) && = delete;
template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs const..., _Args...>>>
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&& noexcept(
+ constexpr auto operator()(_Args&&... __args) const&& noexcept(
noexcept(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)))
-> decltype(_Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...)) {
return _Op()(std::get<_Idx>(std::move(__bound_args_))..., std::forward<_Args>(__args)...);
diff --git a/libcxx/include/__functional/pointer_to_binary_function.h b/libcxx/include/__functional/pointer_to_binary_function.h
index 89e0fa5fe2ac17..5b48fa74be8a3e 100644
--- a/libcxx/include/__functional/pointer_to_binary_function.h
+++ b/libcxx/include/__functional/pointer_to_binary_function.h
@@ -26,12 +26,12 @@ class _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function : public __binary_f
_Result (*__f_)(_Arg1, _Arg2);
public:
- _LIBCPP_HIDE_FROM_ABI explicit pointer_to_binary_function(_Result (*__f)(_Arg1, _Arg2)) : __f_(__f) {}
- _LIBCPP_HIDE_FROM_ABI _Result operator()(_Arg1 __x, _Arg2 __y) const { return __f_(__x, __y); }
+ explicit pointer_to_binary_function(_Result (*__f)(_Arg1, _Arg2)) : __f_(__f) {}
+ _Result operator()(_Arg1 __x, _Arg2 __y) const { return __f_(__x, __y); }
};
template <class _Arg1, class _Arg2, class _Result>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI pointer_to_binary_function<_Arg1, _Arg2, _Result>
+_LIBCPP_DEPRECATED_IN_CXX11 inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
ptr_fun(_Result (*__f)(_Arg1, _Arg2)) {
return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__f);
}
diff --git a/libcxx/include/__functional/pointer_to_unary_function.h b/libcxx/include/__functional/pointer_to_unary_function.h
index b7778e4502dbc2..ca00a45e952f8b 100644
--- a/libcxx/include/__functional/pointer_to_unary_function.h
+++ b/libcxx/include/__functional/pointer_to_unary_function.h
@@ -26,13 +26,12 @@ class _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function : public __unary_fun
_Result (*__f_)(_Arg);
public:
- _LIBCPP_HIDE_FROM_ABI explicit pointer_to_unary_function(_Result (*__f)(_Arg)) : __f_(__f) {}
- _LIBCPP_HIDE_FROM_ABI _Result operator()(_Arg __x) const { return __f_(__x); }
+ explicit pointer_to_unary_function(_Result (*__f)(_Arg)) : __f_(__f) {}
+ _Result operator()(_Arg __x) const { return __f_(__x); }
};
template <class _Arg, class _Result>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI pointer_to_unary_function<_Arg, _Result>
-ptr_fun(_Result (*__f)(_Arg)) {
+_LIBCPP_DEPRECATED_IN_CXX11 inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__f)(_Arg)) {
return pointer_to_unary_function<_Arg, _Result>(__f);
}
diff --git a/libcxx/include/__functional/ranges_operations.h b/libcxx/include/__functional/ranges_operations.h
index 66fe053b15634c..dd5a1453bff0b5 100644
--- a/libcxx/include/__functional/ranges_operations.h
+++ b/libcxx/include/__functional/ranges_operations.h
@@ -30,7 +30,7 @@ namespace ranges {
struct equal_to {
template <class _Tp, class _Up>
requires equality_comparable_with<_Tp, _Up>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
+ [[nodiscard]] constexpr bool operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(bool(std::forward<_Tp>(__t) == std::forward<_Up>(__u)))) {
return std::forward<_Tp>(__t) == std::forward<_Up>(__u);
}
@@ -41,7 +41,7 @@ struct equal_to {
struct not_equal_to {
template <class _Tp, class _Up>
requires equality_comparable_with<_Tp, _Up>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
+ [[nodiscard]] constexpr bool operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(bool(!(std::forward<_Tp>(__t) == std::forward<_Up>(__u))))) {
return !(std::forward<_Tp>(__t) == std::forward<_Up>(__u));
}
@@ -52,7 +52,7 @@ struct not_equal_to {
struct less {
template <class _Tp, class _Up>
requires totally_ordered_with<_Tp, _Up>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
+ [[nodiscard]] constexpr bool operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(bool(std::forward<_Tp>(__t) < std::forward<_Up>(__u)))) {
return std::forward<_Tp>(__t) < std::forward<_Up>(__u);
}
@@ -63,7 +63,7 @@ struct less {
struct less_equal {
template <class _Tp, class _Up>
requires totally_ordered_with<_Tp, _Up>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
+ [[nodiscard]] constexpr bool operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(bool(!(std::forward<_Up>(__u) < std::forward<_Tp>(__t))))) {
return !(std::forward<_Up>(__u) < std::forward<_Tp>(__t));
}
@@ -74,7 +74,7 @@ struct less_equal {
struct greater {
template <class _Tp, class _Up>
requires totally_ordered_with<_Tp, _Up>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
+ [[nodiscard]] constexpr bool operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(bool(std::forward<_Up>(__u) < std::forward<_Tp>(__t)))) {
return std::forward<_Up>(__u) < std::forward<_Tp>(__t);
}
@@ -85,7 +85,7 @@ struct greater {
struct greater_equal {
template <class _Tp, class _Up>
requires totally_ordered_with<_Tp, _Up>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t, _Up&& __u) const
+ [[nodiscard]] constexpr bool operator()(_Tp&& __t, _Up&& __u) const
noexcept(noexcept(bool(!(std::forward<_Tp>(__t) < std::forward<_Up>(__u))))) {
return !(std::forward<_Tp>(__t) < std::forward<_Up>(__u));
}
diff --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h
index b1efd9f76d877b..0d291e2c8dbf7c 100644
--- a/libcxx/include/__functional/reference_wrapper.h
+++ b/libcxx/include/__functional/reference_wrapper.h
@@ -50,20 +50,18 @@ class reference_wrapper : public __weak_result_type<_Tp> {
template <class _Up,
class = __void_t<decltype(__fun(std::declval<_Up>()))>,
__enable_if_t<!is_same<__remove_cvref_t<_Up>, reference_wrapper>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper(_Up&& __u)
- _NOEXCEPT_(noexcept(__fun(std::declval<_Up>()))) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(std::declval<_Up>()))) {
type& __f = static_cast<_Up&&>(__u);
__f_ = std::addressof(__f);
}
// access
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 operator type&() const _NOEXCEPT { return *__f_; }
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 type& get() const _NOEXCEPT { return *__f_; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 operator type&() const _NOEXCEPT { return *__f_; }
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX20 type& get() const _NOEXCEPT { return *__f_; }
// invoke
template <class... _ArgTypes>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __invoke_result_t<type&, _ArgTypes...>
- operator()(_ArgTypes&&... __args) const
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 __invoke_result_t<type&, _ArgTypes...> operator()(_ArgTypes&&... __args) const
#if _LIBCPP_STD_VER >= 17
// Since is_nothrow_invocable requires C++17 LWG3764 is not backported
// to earlier versions.
@@ -77,7 +75,7 @@ class reference_wrapper : public __weak_result_type<_Tp> {
// [refwrap.comparisons], comparisons
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(reference_wrapper __x, reference_wrapper __y)
+ friend constexpr bool operator==(reference_wrapper __x, reference_wrapper __y)
requires requires {
{ __x.get() == __y.get() } -> __core_convertible_to<bool>;
}
@@ -85,7 +83,7 @@ class reference_wrapper : public __weak_result_type<_Tp> {
return __x.get() == __y.get();
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(reference_wrapper __x, const _Tp& __y)
+ friend constexpr bool operator==(reference_wrapper __x, const _Tp& __y)
requires requires {
{ __x.get() == __y } -> __core_convertible_to<bool>;
}
@@ -93,7 +91,7 @@ class reference_wrapper : public __weak_result_type<_Tp> {
return __x.get() == __y;
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(reference_wrapper __x, reference_wrapper<const _Tp> __y)
+ friend constexpr bool operator==(reference_wrapper __x, reference_wrapper<const _Tp> __y)
requires(!is_const_v<_Tp>) && requires {
{ __x.get() == __y.get() } -> __core_convertible_to<bool>;
}
@@ -101,19 +99,19 @@ class reference_wrapper : public __weak_result_type<_Tp> {
return __x.get() == __y.get();
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr auto operator<=>(reference_wrapper __x, reference_wrapper __y)
+ friend constexpr auto operator<=>(reference_wrapper __x, reference_wrapper __y)
requires requires { std::__synth_three_way(__x.get(), __y.get()); }
{
return std::__synth_three_way(__x.get(), __y.get());
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr auto operator<=>(reference_wrapper __x, const _Tp& __y)
+ friend constexpr auto operator<=>(reference_wrapper __x, const _Tp& __y)
requires requires { std::__synth_three_way(__x.get(), __y); }
{
return std::__synth_three_way(__x.get(), __y);
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr auto operator<=>(reference_wrapper __x, reference_wrapper<const _Tp> __y)
+ friend constexpr auto operator<=>(reference_wrapper __x, reference_wrapper<const _Tp> __y)
requires(!is_const_v<_Tp>) && requires { std::__synth_three_way(__x.get(), __y.get()); }
{
return std::__synth_three_way(__x.get(), __y.get());
@@ -128,25 +126,23 @@ reference_wrapper(_Tp&) -> reference_wrapper<_Tp>;
#endif
template <class _Tp>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<_Tp> ref(_Tp& __t) _NOEXCEPT {
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<_Tp> ref(_Tp& __t) _NOEXCEPT {
return reference_wrapper<_Tp>(__t);
}
template <class _Tp>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<_Tp>
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<_Tp>
ref(reference_wrapper<_Tp> __t) _NOEXCEPT {
return __t;
}
template <class _Tp>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<const _Tp>
-cref(const _Tp& __t) _NOEXCEPT {
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<const _Tp> cref(const _Tp& __t) _NOEXCEPT {
return reference_wrapper<const _Tp>(__t);
}
template <class _Tp>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<const _Tp>
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<const _Tp>
cref(reference_wrapper<_Tp> __t) _NOEXCEPT {
return __t;
}
diff --git a/libcxx/include/__functional/unary_negate.h b/libcxx/include/__functional/unary_negate.h
index 761f0be5f85625..6ea05c5a8f9ab6 100644
--- a/libcxx/include/__functional/unary_negate.h
+++ b/libcxx/include/__functional/unary_negate.h
@@ -26,16 +26,14 @@ class _LIBCPP_DEPRECATED_IN_CXX17 unary_negate : public __unary_function<typenam
_Predicate __pred_;
public:
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI explicit unary_negate(const _Predicate& __pred)
- : __pred_(__pred) {}
- _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI bool
- operator()(const typename _Predicate::argument_type& __x) const {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit unary_negate(const _Predicate& __pred) : __pred_(__pred) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const typename _Predicate::argument_type& __x) const {
return !__pred_(__x);
}
};
template <class _Predicate>
-_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI unary_negate<_Predicate>
+_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_SINCE_CXX14 unary_negate<_Predicate>
not1(const _Predicate& __pred) {
return unary_negate<_Predicate>(__pred);
}
diff --git a/libcxx/include/__fwd/array.h b/libcxx/include/__fwd/array.h
index 476de885c511d8..31b77a027ab079 100644
--- a/libcxx/include/__fwd/array.h
+++ b/libcxx/include/__fwd/array.h
@@ -23,17 +23,17 @@ template <class _Tp, size_t _Size>
struct array;
template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& get(array<_Tp, _Size>&) _NOEXCEPT;
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& get(array<_Tp, _Size>&) _NOEXCEPT;
template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp& get(const array<_Tp, _Size>&) _NOEXCEPT;
+_LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp& get(const array<_Tp, _Size>&) _NOEXCEPT;
#ifndef _LIBCPP_CXX03_LANG
template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp&& get(array<_Tp, _Size>&&) _NOEXCEPT;
+_LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp&& get(array<_Tp, _Size>&&) _NOEXCEPT;
template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp&& get(const array<_Tp, _Size>&&) _NOEXCEPT;
+_LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp&& get(const array<_Tp, _Size>&&) _NOEXCEPT;
#endif
template <class _Tp>
diff --git a/libcxx/include/__fwd/bit_reference.h b/libcxx/include/__fwd/bit_reference.h
index 36058d59cc22a6..1fc215729275ec 100644
--- a/libcxx/include/__fwd/bit_reference.h
+++ b/libcxx/include/__fwd/bit_reference.h
@@ -27,17 +27,17 @@ template <class, class = void>
struct __size_difference_type_traits;
template <class _StoragePointer>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+_LIBCPP_CONSTEXPR_SINCE_CXX14 void
__fill_masked_range(_StoragePointer __word, unsigned __clz, unsigned __ctz, bool __fill_val);
template <class _StorageType>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _StorageType __trailing_mask(unsigned __clz);
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _StorageType __trailing_mask(unsigned __clz);
template <class _StorageType>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _StorageType __leading_mask(unsigned __ctz);
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _StorageType __leading_mask(unsigned __ctz);
template <class _StorageType>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _StorageType __middle_mask(unsigned __clz, unsigned __ctz);
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _StorageType __middle_mask(unsigned __clz, unsigned __ctz);
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__fwd/complex.h b/libcxx/include/__fwd/complex.h
index ff3c5c1e148b80..37e0e9d743501f 100644
--- a/libcxx/include/__fwd/complex.h
+++ b/libcxx/include/__fwd/complex.h
@@ -24,16 +24,16 @@ class complex;
#if _LIBCPP_STD_VER >= 26
template <size_t _Ip, class _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp& get(complex<_Tp>&) noexcept;
+constexpr _Tp& get(complex<_Tp>&) noexcept;
template <size_t _Ip, class _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp&& get(complex<_Tp>&&) noexcept;
+constexpr _Tp&& get(complex<_Tp>&&) noexcept;
template <size_t _Ip, class _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr const _Tp& get(const complex<_Tp>&) noexcept;
+constexpr const _Tp& get(const complex<_Tp>&) noexcept;
template <size_t _Ip, class _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr const _Tp&& get(const complex<_Tp>&&) noexcept;
+constexpr const _Tp&& get(const complex<_Tp>&&) noexcept;
#endif // _LIBCPP_STD_VER >= 26
diff --git a/libcxx/include/__fwd/pair.h b/libcxx/include/__fwd/pair.h
index cf07eabab69030..df7c3933bde1b9 100644
--- a/libcxx/include/__fwd/pair.h
+++ b/libcxx/include/__fwd/pair.h
@@ -29,20 +29,18 @@ template <class _Type1, class _Type2>
inline const bool __is_pair_v<pair<_Type1, _Type2> > = true;
template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&
-get(pair<_T1, _T2>&) _NOEXCEPT;
+_LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type& get(pair<_T1, _T2>&) _NOEXCEPT;
template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
+_LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
get(const pair<_T1, _T2>&) _NOEXCEPT;
#ifndef _LIBCPP_CXX03_LANG
template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
-get(pair<_T1, _T2>&&) _NOEXCEPT;
+_LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&& get(pair<_T1, _T2>&&) _NOEXCEPT;
template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
+_LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
get(const pair<_T1, _T2>&&) _NOEXCEPT;
#endif
diff --git a/libcxx/include/__fwd/subrange.h b/libcxx/include/__fwd/subrange.h
index 81db94ab736fa4..d3fa7595b4aece 100644
--- a/libcxx/include/__fwd/subrange.h
+++ b/libcxx/include/__fwd/subrange.h
@@ -32,11 +32,11 @@ class subrange;
template <size_t _Index, class _Iter, class _Sent, subrange_kind _Kind>
requires((_Index == 0 && copyable<_Iter>) || _Index == 1)
-_LIBCPP_HIDE_FROM_ABI constexpr auto get(const subrange<_Iter, _Sent, _Kind>&);
+constexpr auto get(const subrange<_Iter, _Sent, _Kind>&);
template <size_t _Index, class _Iter, class _Sent, subrange_kind _Kind>
requires(_Index < 2)
-_LIBCPP_HIDE_FROM_ABI constexpr auto get(subrange<_Iter, _Sent, _Kind>&&);
+constexpr auto get(subrange<_Iter, _Sent, _Kind>&&);
} // namespace ranges
diff --git a/libcxx/include/__fwd/tuple.h b/libcxx/include/__fwd/tuple.h
index d9126d7be9e78c..2691fb92bd35bb 100644
--- a/libcxx/include/__fwd/tuple.h
+++ b/libcxx/include/__fwd/tuple.h
@@ -44,19 +44,17 @@ template <class>
struct tuple_size;
template <size_t _Ip, class... _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type&
-get(tuple<_Tp...>&) noexcept;
+_LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type& get(tuple<_Tp...>&) noexcept;
template <size_t _Ip, class... _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&
+_LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&
get(const tuple<_Tp...>&) noexcept;
template <size_t _Ip, class... _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type&&
-get(tuple<_Tp...>&&) noexcept;
+_LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type&& get(tuple<_Tp...>&&) noexcept;
template <size_t _Ip, class... _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
+_LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
get(const tuple<_Tp...>&&) noexcept;
#endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__fwd/variant.h b/libcxx/include/__fwd/variant.h
index a484248fe542c3..cc0481cc508638 100644
--- a/libcxx/include/__fwd/variant.h
+++ b/libcxx/include/__fwd/variant.h
@@ -38,28 +38,28 @@ using variant_alternative_t = typename variant_alternative<_Ip, _Tp>::type;
inline constexpr size_t variant_npos = static_cast<size_t>(-1);
template <size_t _Ip, class... _Types>
-_LIBCPP_HIDE_FROM_ABI constexpr variant_alternative_t<_Ip, variant<_Types...>>& get(variant<_Types...>&);
+constexpr variant_alternative_t<_Ip, variant<_Types...>>& get(variant<_Types...>&);
template <size_t _Ip, class... _Types>
-_LIBCPP_HIDE_FROM_ABI constexpr variant_alternative_t<_Ip, variant<_Types...>>&& get(variant<_Types...>&&);
+constexpr variant_alternative_t<_Ip, variant<_Types...>>&& get(variant<_Types...>&&);
template <size_t _Ip, class... _Types>
-_LIBCPP_HIDE_FROM_ABI constexpr const variant_alternative_t<_Ip, variant<_Types...>>& get(const variant<_Types...>&);
+constexpr const variant_alternative_t<_Ip, variant<_Types...>>& get(const variant<_Types...>&);
template <size_t _Ip, class... _Types>
-_LIBCPP_HIDE_FROM_ABI constexpr const variant_alternative_t<_Ip, variant<_Types...>>&& get(const variant<_Types...>&&);
+constexpr const variant_alternative_t<_Ip, variant<_Types...>>&& get(const variant<_Types...>&&);
template <class _Tp, class... _Types>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp& get(variant<_Types...>&);
+constexpr _Tp& get(variant<_Types...>&);
template <class _Tp, class... _Types>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp&& get(variant<_Types...>&&);
+constexpr _Tp&& get(variant<_Types...>&&);
template <class _Tp, class... _Types>
-_LIBCPP_HIDE_FROM_ABI constexpr const _Tp& get(const variant<_Types...>&);
+constexpr const _Tp& get(const variant<_Types...>&);
template <class _Tp, class... _Types>
-_LIBCPP_HIDE_FROM_ABI constexpr const _Tp&& get(const variant<_Types...>&&);
+constexpr const _Tp&& get(const variant<_Types...>&&);
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__ios/fpos.h b/libcxx/include/__ios/fpos.h
index af114421c839f0..d06405bfe01770 100644
--- a/libcxx/include/__ios/fpos.h
+++ b/libcxx/include/__ios/fpos.h
@@ -26,30 +26,30 @@ class fpos {
streamoff __off_;
public:
- _LIBCPP_HIDE_FROM_ABI fpos(streamoff __off = streamoff()) : __st_(), __off_(__off) {}
+ fpos(streamoff __off = streamoff()) : __st_(), __off_(__off) {}
- _LIBCPP_HIDE_FROM_ABI operator streamoff() const { return __off_; }
+ operator streamoff() const { return __off_; }
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _StateT state() const { return __st_; }
- _LIBCPP_HIDE_FROM_ABI void state(_StateT __st) { __st_ = __st; }
+ [[__nodiscard__]] _StateT state() const { return __st_; }
+ void state(_StateT __st) { __st_ = __st; }
- _LIBCPP_HIDE_FROM_ABI fpos& operator+=(streamoff __off) {
+ fpos& operator+=(streamoff __off) {
__off_ += __off;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI fpos operator+(streamoff __off) const {
+ [[__nodiscard__]] fpos operator+(streamoff __off) const {
fpos __t(*this);
__t += __off;
return __t;
}
- _LIBCPP_HIDE_FROM_ABI fpos& operator-=(streamoff __off) {
+ fpos& operator-=(streamoff __off) {
__off_ -= __off;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI fpos operator-(streamoff __off) const {
+ [[__nodiscard__]] fpos operator-(streamoff __off) const {
fpos __t(*this);
__t -= __off;
return __t;
@@ -57,17 +57,17 @@ class fpos {
};
template <class _StateT>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI streamoff operator-(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
+[[__nodiscard__]] inline streamoff operator-(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
return streamoff(__x) - streamoff(__y);
}
template <class _StateT>
-inline _LIBCPP_HIDE_FROM_ABI bool operator==(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
+inline bool operator==(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
return streamoff(__x) == streamoff(__y);
}
template <class _StateT>
-inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
+inline bool operator!=(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
return streamoff(__x) != streamoff(__y);
}
diff --git a/libcxx/include/__iterator/access.h b/libcxx/include/__iterator/access.h
index 5921c8f23dc0b7..3d1a359c69451f 100644
--- a/libcxx/include/__iterator/access.h
+++ b/libcxx/include/__iterator/access.h
@@ -20,26 +20,26 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, size_t _Np>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* begin(_Tp (&__array)[_Np]) _NOEXCEPT {
+[[__nodiscard__]] _LIBCPP_CONSTEXPR _Tp* begin(_Tp (&__array)[_Np]) _NOEXCEPT {
return __array;
}
template <class _Tp, size_t _Np>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* end(_Tp (&__array)[_Np]) _NOEXCEPT {
+[[__nodiscard__]] _LIBCPP_CONSTEXPR _Tp* end(_Tp (&__array)[_Np]) _NOEXCEPT {
return __array + _Np;
}
#if !defined(_LIBCPP_CXX03_LANG)
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto begin(_Cp& __c) //
- noexcept(noexcept(__c.begin())) //
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 auto begin(_Cp& __c) //
+ noexcept(noexcept(__c.begin())) //
-> decltype(/*-*/ __c.begin()) {
return /*--------*/ __c.begin();
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto begin(const _Cp& __c)
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 auto begin(const _Cp& __c)
//
noexcept(noexcept(__c.begin())) //
-> decltype(/*-*/ __c.begin()) {
@@ -47,15 +47,15 @@ template <class _Cp>
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto end(_Cp& __c) //
- noexcept(noexcept(__c.end())) //
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 auto end(_Cp& __c) //
+ noexcept(noexcept(__c.end())) //
-> decltype(/*-*/ __c.end()) {
return /*--------*/ __c.end();
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto end(const _Cp& __c) //
- noexcept(noexcept(__c.end())) //
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 auto end(const _Cp& __c) //
+ noexcept(noexcept(__c.end())) //
-> decltype(/*-*/ __c.end()) {
return /*--------*/ __c.end();
}
@@ -63,14 +63,13 @@ template <class _Cp>
# if _LIBCPP_STD_VER >= 14
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI constexpr auto cbegin(const _Cp& __c) noexcept(noexcept(std::begin(__c)))
+[[__nodiscard__]] constexpr auto cbegin(const _Cp& __c) noexcept(noexcept(std::begin(__c)))
-> decltype(std::begin(__c)) {
return std::begin(__c);
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI constexpr auto cend(const _Cp& __c) noexcept(noexcept(std::end(__c)))
- -> decltype(std::end(__c)) {
+[[__nodiscard__]] constexpr auto cend(const _Cp& __c) noexcept(noexcept(std::end(__c))) -> decltype(std::end(__c)) {
return std::end(__c);
}
@@ -79,22 +78,22 @@ template <class _Cp>
#else // defined(_LIBCPP_CXX03_LANG)
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI typename _Cp::iterator begin(_Cp& __c) {
+[[__nodiscard__]] typename _Cp::iterator begin(_Cp& __c) {
return __c.begin();
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI typename _Cp::const_iterator begin(const _Cp& __c) {
+[[__nodiscard__]] typename _Cp::const_iterator begin(const _Cp& __c) {
return __c.begin();
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI typename _Cp::iterator end(_Cp& __c) {
+[[__nodiscard__]] typename _Cp::iterator end(_Cp& __c) {
return __c.end();
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI typename _Cp::const_iterator end(const _Cp& __c) {
+[[__nodiscard__]] typename _Cp::const_iterator end(const _Cp& __c) {
return __c.end();
}
diff --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h
index c7d3c1f0e8f057..61e269400cf07d 100644
--- a/libcxx/include/__iterator/advance.h
+++ b/libcxx/include/__iterator/advance.h
@@ -35,14 +35,14 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX17 void
__advance(_InputIter& __i, typename iterator_traits<_InputIter>::difference_type __n, input_iterator_tag) {
for (; __n > 0; --__n)
++__i;
}
template <class _BiDirIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX17 void
__advance(_BiDirIter& __i, typename iterator_traits<_BiDirIter>::difference_type __n, bidirectional_iterator_tag) {
if (__n >= 0)
for (; __n > 0; --__n)
@@ -53,7 +53,7 @@ __advance(_BiDirIter& __i, typename iterator_traits<_BiDirIter>::difference_type
}
template <class _RandIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void
+_LIBCPP_CONSTEXPR_SINCE_CXX17 void
__advance(_RandIter& __i, typename iterator_traits<_RandIter>::difference_type __n, random_access_iterator_tag) {
__i += __n;
}
@@ -62,7 +62,7 @@ template < class _InputIter,
class _Distance,
class _IntegralDistance = decltype(std::__convert_to_integral(std::declval<_Distance>())),
__enable_if_t<is_integral<_IntegralDistance>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 void advance(_InputIter& __i, _Distance __orig_n) {
+_LIBCPP_CONSTEXPR_SINCE_CXX17 void advance(_InputIter& __i, _Distance __orig_n) {
typedef typename iterator_traits<_InputIter>::difference_type _Difference;
_Difference __n = static_cast<_Difference>(std::__convert_to_integral(__orig_n));
_LIBCPP_ASSERT_PEDANTIC(__has_bidirectional_iterator_category<_InputIter>::value || __n >= 0,
@@ -78,7 +78,7 @@ namespace ranges {
struct __advance {
private:
template <class _Ip>
- _LIBCPP_HIDE_FROM_ABI static constexpr void __advance_forward(_Ip& __i, iter_difference_t<_Ip> __n) {
+ static constexpr void __advance_forward(_Ip& __i, iter_difference_t<_Ip> __n) {
while (__n > 0) {
--__n;
++__i;
@@ -86,7 +86,7 @@ struct __advance {
}
template <class _Ip>
- _LIBCPP_HIDE_FROM_ABI static constexpr void __advance_backward(_Ip& __i, iter_difference_t<_Ip> __n) {
+ static constexpr void __advance_backward(_Ip& __i, iter_difference_t<_Ip> __n) {
while (__n < 0) {
++__n;
--__i;
@@ -96,7 +96,7 @@ struct __advance {
public:
// Preconditions: If `I` does not model `bidirectional_iterator`, `n` is not negative.
template <input_or_output_iterator _Ip>
- _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Ip& __i, iter_difference_t<_Ip> __n) const {
+ constexpr void operator()(_Ip& __i, iter_difference_t<_Ip> __n) const {
_LIBCPP_ASSERT_PEDANTIC(bidirectional_iterator<_Ip> || __n >= 0,
"ranges::advance: Can only pass a negative `n` with a bidirectional_iterator.");
@@ -120,7 +120,7 @@ struct __advance {
// Preconditions: Either `assignable_from<I&, S> || sized_sentinel_for<S, I>` is modeled, or [i, bound_sentinel)
// denotes a range.
template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
- _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Ip& __i, _Sp __bound_sentinel) const {
+ constexpr void operator()(_Ip& __i, _Sp __bound_sentinel) const {
// If `I` and `S` model `assignable_from<I&, S>`, equivalent to `i = std::move(bound_sentinel)`.
if constexpr (assignable_from<_Ip&, _Sp>) {
__i = std::move(__bound_sentinel);
@@ -145,8 +145,7 @@ struct __advance {
// `same_as<I, S>`.
// Returns: `n - M`, where `M` is the difference between the ending and starting position.
template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
- _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Ip>
- operator()(_Ip& __i, iter_difference_t<_Ip> __n, _Sp __bound_sentinel) const {
+ constexpr iter_difference_t<_Ip> operator()(_Ip& __i, iter_difference_t<_Ip> __n, _Sp __bound_sentinel) const {
_LIBCPP_ASSERT_PEDANTIC(
(bidirectional_iterator<_Ip> && same_as<_Ip, _Sp>) || (__n >= 0),
"ranges::advance: Can only pass a negative `n` with a bidirectional_iterator coming from a common_range.");
diff --git a/libcxx/include/__iterator/aliasing_iterator.h b/libcxx/include/__iterator/aliasing_iterator.h
index 528e95eb14d680..d4344c1332450d 100644
--- a/libcxx/include/__iterator/aliasing_iterator.h
+++ b/libcxx/include/__iterator/aliasing_iterator.h
@@ -50,72 +50,72 @@ struct __aliasing_iterator_wrapper {
static_assert(is_trivially_copyable<value_type>::value);
static_assert(sizeof(__base_value_type) == sizeof(value_type));
- _LIBCPP_HIDE_FROM_ABI __iterator() = default;
- _LIBCPP_HIDE_FROM_ABI __iterator(_BaseIter __base) _NOEXCEPT : __base_(__base) {}
+ __iterator() = default;
+ __iterator(_BaseIter __base) _NOEXCEPT : __base_(__base) {}
- _LIBCPP_HIDE_FROM_ABI __iterator& operator++() _NOEXCEPT {
+ __iterator& operator++() _NOEXCEPT {
++__base_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI __iterator operator++(int) _NOEXCEPT {
+ __iterator operator++(int) _NOEXCEPT {
__iterator __tmp(*this);
++__base_;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI __iterator& operator--() _NOEXCEPT {
+ __iterator& operator--() _NOEXCEPT {
--__base_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI __iterator operator--(int) _NOEXCEPT {
+ __iterator operator--(int) _NOEXCEPT {
__iterator __tmp(*this);
--__base_;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI friend __iterator operator+(__iterator __iter, difference_type __n) _NOEXCEPT {
+ friend __iterator operator+(__iterator __iter, difference_type __n) _NOEXCEPT {
return __iterator(__iter.__base_ + __n);
}
- _LIBCPP_HIDE_FROM_ABI friend __iterator operator+(difference_type __n, __iterator __iter) _NOEXCEPT {
+ friend __iterator operator+(difference_type __n, __iterator __iter) _NOEXCEPT {
return __iterator(__n + __iter.__base_);
}
- _LIBCPP_HIDE_FROM_ABI __iterator& operator+=(difference_type __n) _NOEXCEPT {
+ __iterator& operator+=(difference_type __n) _NOEXCEPT {
__base_ += __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI friend __iterator operator-(__iterator __iter, difference_type __n) _NOEXCEPT {
+ friend __iterator operator-(__iterator __iter, difference_type __n) _NOEXCEPT {
return __iterator(__iter.__base_ - __n);
}
- _LIBCPP_HIDE_FROM_ABI friend difference_type operator-(__iterator __lhs, __iterator __rhs) _NOEXCEPT {
+ friend difference_type operator-(__iterator __lhs, __iterator __rhs) _NOEXCEPT {
return __lhs.__base_ - __rhs.__base_;
}
- _LIBCPP_HIDE_FROM_ABI __iterator& operator-=(difference_type __n) _NOEXCEPT {
+ __iterator& operator-=(difference_type __n) _NOEXCEPT {
__base_ -= __n;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _BaseIter __base() const _NOEXCEPT { return __base_; }
+ _BaseIter __base() const _NOEXCEPT { return __base_; }
- _LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
+ _Alias operator*() const _NOEXCEPT {
_Alias __val;
__builtin_memcpy(std::addressof(__val), std::__to_address(__base_), sizeof(value_type));
return __val;
}
- _LIBCPP_HIDE_FROM_ABI value_type operator[](difference_type __n) const _NOEXCEPT { return *(*this + __n); }
+ value_type operator[](difference_type __n) const _NOEXCEPT { return *(*this + __n); }
- _LIBCPP_HIDE_FROM_ABI friend bool operator==(const __iterator& __lhs, const __iterator& __rhs) _NOEXCEPT {
+ friend bool operator==(const __iterator& __lhs, const __iterator& __rhs) _NOEXCEPT {
return __lhs.__base_ == __rhs.__base_;
}
- _LIBCPP_HIDE_FROM_ABI friend bool operator!=(const __iterator& __lhs, const __iterator& __rhs) _NOEXCEPT {
+ friend bool operator!=(const __iterator& __lhs, const __iterator& __rhs) _NOEXCEPT {
return __lhs.__base_ != __rhs.__base_;
}
};
diff --git a/libcxx/include/__iterator/back_insert_iterator.h b/libcxx/include/__iterator/back_insert_iterator.h
index 456653ab36f339..6d1f56fa88c9a4 100644
--- a/libcxx/include/__iterator/back_insert_iterator.h
+++ b/libcxx/include/__iterator/back_insert_iterator.h
@@ -44,33 +44,27 @@ class back_insert_iterator
typedef void reference;
typedef _Container container_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit back_insert_iterator(_Container& __x)
- : container(std::addressof(__x)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator&
- operator=(const typename _Container::value_type& __value) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit back_insert_iterator(_Container& __x) : container(std::addressof(__x)) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator=(const typename _Container::value_type& __value) {
container->push_back(__value);
return *this;
}
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator&
- operator=(typename _Container::value_type&& __value) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator=(typename _Container::value_type&& __value) {
container->push_back(std::move(__value));
return *this;
}
#endif // _LIBCPP_CXX03_LANG
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator*() {
- return *this;
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator++() { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator operator++(int) { return *this; }
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator*() { return *this; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator& operator++() { return *this; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator operator++(int) { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Container* __get_container() const { return container; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _Container* __get_container() const { return container; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(back_insert_iterator);
template <class _Container>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator<_Container>
-back_inserter(_Container& __x) {
+inline _LIBCPP_CONSTEXPR_SINCE_CXX20 back_insert_iterator<_Container> back_inserter(_Container& __x) {
return back_insert_iterator<_Container>(__x);
}
diff --git a/libcxx/include/__iterator/bounded_iter.h b/libcxx/include/__iterator/bounded_iter.h
index 9e5d929c8f1911..8f9492dab9e12d 100644
--- a/libcxx/include/__iterator/bounded_iter.h
+++ b/libcxx/include/__iterator/bounded_iter.h
@@ -66,10 +66,10 @@ struct __bounded_iter {
//
// Such an iterator points past the end of an empty range, so it is not dereferenceable.
// Operations like comparison and assignment are valid.
- _LIBCPP_HIDE_FROM_ABI __bounded_iter() = default;
+ __bounded_iter() = default;
- _LIBCPP_HIDE_FROM_ABI __bounded_iter(__bounded_iter const&) = default;
- _LIBCPP_HIDE_FROM_ABI __bounded_iter(__bounded_iter&&) = default;
+ __bounded_iter(__bounded_iter const&) = default;
+ __bounded_iter(__bounded_iter&&) = default;
template <class _OtherIterator,
__enable_if_t<
@@ -77,14 +77,14 @@ struct __bounded_iter {
_Or<is_same<reference, __iterator_reference<_OtherIterator> >,
is_same<reference, __make_const_lvalue_ref<__iterator_reference<_OtherIterator> > > > >::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bounded_iter(__bounded_iter<_OtherIterator> const& __other) _NOEXCEPT
+ _LIBCPP_CONSTEXPR __bounded_iter(__bounded_iter<_OtherIterator> const& __other) _NOEXCEPT
: __current_(__other.__current_),
__begin_(__other.__begin_),
__end_(__other.__end_) {}
// Assign a bounded iterator to another one, rebinding the bounds of the iterator as well.
- _LIBCPP_HIDE_FROM_ABI __bounded_iter& operator=(__bounded_iter const&) = default;
- _LIBCPP_HIDE_FROM_ABI __bounded_iter& operator=(__bounded_iter&&) = default;
+ __bounded_iter& operator=(__bounded_iter const&) = default;
+ __bounded_iter& operator=(__bounded_iter&&) = default;
private:
// Create an iterator wrapping the given iterator, and whose bounds are described
@@ -95,7 +95,7 @@ struct __bounded_iter {
//
// Since it is non-standard for iterators to have this constructor, __bounded_iter must
// be created via `std::__make_bounded_iter`.
- _LIBCPP_HIDE_FROM_ABI
+
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __bounded_iter(_Iterator __current, _Iterator __begin, _Iterator __end)
: __current_(__current), __begin_(__begin), __end_(__end) {
_LIBCPP_ASSERT_INTERNAL(
@@ -114,20 +114,19 @@ struct __bounded_iter {
// that the iterator is always within `[begin, end]`, we only need to check it's not pointing to
// `end`. This is easier for the optimizer because it aligns with the `iter != container.end()`
// checks that typical callers already use (see https://llvm.org/PR78829).
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current_ != __end_, "__bounded_iter::operator*: Attempt to dereference an iterator at the end");
return *__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current_ != __end_, "__bounded_iter::operator->: Attempt to dereference an iterator at the end");
return std::__to_address(__current_);
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference
- operator[](difference_type __n) const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator[](difference_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__n >= __begin_ - __current_, "__bounded_iter::operator[]: Attempt to index an iterator past the start");
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
@@ -138,31 +137,31 @@ struct __bounded_iter {
// Arithmetic operations.
//
// These operations check that the iterator remains within `[begin, end]`.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator++() _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator++() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current_ != __end_, "__bounded_iter::operator++: Attempt to advance an iterator past the end");
++__current_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter operator++(int) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter operator++(int) _NOEXCEPT {
__bounded_iter __tmp(*this);
++*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator--() _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator--() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current_ != __begin_, "__bounded_iter::operator--: Attempt to rewind an iterator past the start");
--__current_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter operator--(int) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter operator--(int) _NOEXCEPT {
__bounded_iter __tmp(*this);
--*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator+=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator+=(difference_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__n >= __begin_ - __current_, "__bounded_iter::operator+=: Attempt to rewind an iterator past the start");
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
@@ -170,20 +169,20 @@ struct __bounded_iter {
__current_ += __n;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
operator+(__bounded_iter const& __self, difference_type __n) _NOEXCEPT {
__bounded_iter __tmp(__self);
__tmp += __n;
return __tmp;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
operator+(difference_type __n, __bounded_iter const& __self) _NOEXCEPT {
__bounded_iter __tmp(__self);
__tmp += __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator-=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __bounded_iter& operator-=(difference_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__n <= __current_ - __begin_, "__bounded_iter::operator-=: Attempt to rewind an iterator past the start");
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
@@ -191,13 +190,13 @@ struct __bounded_iter {
__current_ -= __n;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __bounded_iter
operator-(__bounded_iter const& __self, difference_type __n) _NOEXCEPT {
__bounded_iter __tmp(__self);
__tmp -= __n;
return __tmp;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend difference_type
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 friend difference_type
operator-(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ - __y.__current_;
}
@@ -208,37 +207,30 @@ struct __bounded_iter {
// The valid range for each iterator is also not considered as part of the comparison,
// i.e. two iterators pointing to the same location will be considered equal even
// if they have different validity ranges.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator==(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR friend bool operator==(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ == __y.__current_;
}
#if _LIBCPP_STD_VER <= 17
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator!=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR friend bool operator!=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ != __y.__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator<(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR friend bool operator<(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ < __y.__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator>(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR friend bool operator>(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ > __y.__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator<=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR friend bool operator<=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ <= __y.__current_;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
- operator>=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR friend bool operator>=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
return __x.__current_ >= __y.__current_;
}
#else
- _LIBCPP_HIDE_FROM_ABI constexpr friend strong_ordering
- operator<=>(__bounded_iter const& __x, __bounded_iter const& __y) noexcept {
+ constexpr friend strong_ordering operator<=>(__bounded_iter const& __x, __bounded_iter const& __y) noexcept {
if constexpr (three_way_comparable<_Iterator, strong_ordering>) {
return __x.__current_ <=> __y.__current_;
} else {
@@ -263,7 +255,7 @@ struct __bounded_iter {
};
template <class _It>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bounded_iter<_It> __make_bounded_iter(_It __it, _It __begin, _It __end) {
+_LIBCPP_CONSTEXPR __bounded_iter<_It> __make_bounded_iter(_It __it, _It __begin, _It __end) {
return __bounded_iter<_It>(std::move(__it), std::move(__begin), std::move(__end));
}
@@ -278,7 +270,7 @@ struct pointer_traits<__bounded_iter<_Iterator> > {
using element_type = typename pointer_traits<_Iterator>::element_type;
using difference_type = typename pointer_traits<_Iterator>::difference_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static element_type* to_address(pointer __it) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR static element_type* to_address(pointer __it) _NOEXCEPT {
return std::__to_address(__it.__current_);
}
};
diff --git a/libcxx/include/__iterator/capacity_aware_iterator.h b/libcxx/include/__iterator/capacity_aware_iterator.h
index f77c2a528b582c..81dad11ff33b1d 100644
--- a/libcxx/include/__iterator/capacity_aware_iterator.h
+++ b/libcxx/include/__iterator/capacity_aware_iterator.h
@@ -56,49 +56,48 @@ class __capacity_aware_iterator {
using reference = iter_reference_t<_Iter>;
using value_type = iter_value_t<_Iter>;
- _LIBCPP_HIDE_FROM_ABI constexpr __capacity_aware_iterator()
+ constexpr __capacity_aware_iterator()
requires is_default_constructible_v<_Iter>
= default;
template <typename _Iter2>
requires is_convertible_v<_Iter2, _Iter>
- _LIBCPP_HIDE_FROM_ABI constexpr __capacity_aware_iterator(
- const __capacity_aware_iterator<_Iter2, _RangeMaxElements>& __y) noexcept
+ constexpr __capacity_aware_iterator(const __capacity_aware_iterator<_Iter2, _RangeMaxElements>& __y) noexcept
: __iter_(__y.__iter_) {}
template <class _It, size_t _RangeMaxElems2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr auto __make_capacity_aware_iterator(_It __iter) noexcept;
+ friend constexpr auto __make_capacity_aware_iterator(_It __iter) noexcept;
private:
- _LIBCPP_HIDE_FROM_ABI constexpr explicit __capacity_aware_iterator(_Iter __iter) : __iter_(std::move(__iter)) {}
+ constexpr explicit __capacity_aware_iterator(_Iter __iter) : __iter_(std::move(__iter)) {}
public:
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*() const noexcept { return *__iter_; }
- _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator->() const noexcept { return std::__to_address(__iter_); }
+ [[nodiscard]] constexpr decltype(auto) operator*() const noexcept { return *__iter_; }
+ constexpr decltype(auto) operator->() const noexcept { return std::__to_address(__iter_); }
- _LIBCPP_HIDE_FROM_ABI constexpr __capacity_aware_iterator& operator++() noexcept {
+ constexpr __capacity_aware_iterator& operator++() noexcept {
++__iter_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __capacity_aware_iterator operator++(int) noexcept {
+ constexpr __capacity_aware_iterator operator++(int) noexcept {
__capacity_aware_iterator __tmp(*this);
++*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __capacity_aware_iterator& operator--() noexcept {
+ constexpr __capacity_aware_iterator& operator--() noexcept {
--__iter_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __capacity_aware_iterator operator--(int) noexcept {
+ constexpr __capacity_aware_iterator operator--(int) noexcept {
__capacity_aware_iterator __tmp(*this);
--*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __capacity_aware_iterator& operator+=(difference_type __n) noexcept {
+ constexpr __capacity_aware_iterator& operator+=(difference_type __n) noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
static_cast<size_t>(__n >= 0 ? __n : -__n) <= _RangeMaxElements,
"__capacity_aware_iterator::operator+=: Attempting to move iterator past its container's possible range");
@@ -107,7 +106,7 @@ class __capacity_aware_iterator {
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr __capacity_aware_iterator& operator-=(difference_type __n) noexcept {
+ constexpr __capacity_aware_iterator& operator-=(difference_type __n) noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
static_cast<size_t>(__n >= 0 ? __n : -__n) <= _RangeMaxElements,
"__capacity_aware_iterator::operator-=: Attempting to move iterator past its container's possible range");
@@ -116,19 +115,19 @@ class __capacity_aware_iterator {
return *this;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator[](difference_type __n) const noexcept {
+ [[nodiscard]] constexpr decltype(auto) operator[](difference_type __n) const noexcept {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
static_cast<size_t>(__n >= 0 ? __n : -__n) < _RangeMaxElements,
"__capacity_aware_iterator::operator[]: Attempting to index iterator past its container's possible range");
return *(*this + __n);
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool
+ friend constexpr bool
operator==(const __capacity_aware_iterator& __x, const __capacity_aware_iterator& __y) noexcept {
return __x.__iter_ == __y.__iter_;
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr auto
+ friend constexpr auto
operator<=>(const __capacity_aware_iterator& __x, const __capacity_aware_iterator& __y) noexcept {
if constexpr (three_way_comparable_with<_Iter, _Iter, strong_ordering>) {
return __x.__iter_ <=> __y.__iter_;
@@ -142,35 +141,35 @@ class __capacity_aware_iterator {
}
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr __capacity_aware_iterator
+ [[nodiscard]] friend constexpr __capacity_aware_iterator
operator+(const __capacity_aware_iterator& __i, difference_type __n) noexcept {
auto __tmp = __i;
__tmp += __n;
return __tmp;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr __capacity_aware_iterator
+ [[nodiscard]] friend constexpr __capacity_aware_iterator
operator+(difference_type __n, const __capacity_aware_iterator& __i) noexcept {
auto __tmp = __i;
__tmp += __n;
return __tmp;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr __capacity_aware_iterator
+ [[nodiscard]] friend constexpr __capacity_aware_iterator
operator-(const __capacity_aware_iterator& __i, difference_type __n) noexcept {
auto __tmp = __i;
__tmp -= __n;
return __tmp;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr difference_type
+ [[nodiscard]] friend constexpr difference_type
operator-(const __capacity_aware_iterator& __x, const __capacity_aware_iterator& __y) noexcept {
return difference_type(__x.__iter_ - __y.__iter_);
}
};
template <class _It, size_t _RangeMaxElems2>
-_LIBCPP_HIDE_FROM_ABI constexpr auto __make_capacity_aware_iterator(_It __iter) noexcept {
+constexpr auto __make_capacity_aware_iterator(_It __iter) noexcept {
return __capacity_aware_iterator<_It, _RangeMaxElems2>(__iter);
}
diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h
index b234b3810308fe..8d3160fc80d515 100644
--- a/libcxx/include/__iterator/common_iterator.h
+++ b/libcxx/include/__iterator/common_iterator.h
@@ -51,14 +51,12 @@ template <input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent>
requires(!same_as<_Iter, _Sent> && copyable<_Iter>)
class common_iterator {
struct __proxy {
- _LIBCPP_HIDE_FROM_ABI constexpr const iter_value_t<_Iter>* operator->() const noexcept {
- return std::addressof(__value_);
- }
+ constexpr const iter_value_t<_Iter>* operator->() const noexcept { return std::addressof(__value_); }
iter_value_t<_Iter> __value_;
};
struct __postfix_proxy {
- _LIBCPP_HIDE_FROM_ABI constexpr const iter_value_t<_Iter>& operator*() const noexcept { return __value_; }
+ constexpr const iter_value_t<_Iter>& operator*() const noexcept { return __value_; }
iter_value_t<_Iter> __value_;
};
@@ -68,16 +66,16 @@ class common_iterator {
friend class common_iterator;
public:
- _LIBCPP_HIDE_FROM_ABI common_iterator()
+ common_iterator()
requires default_initializable<_Iter>
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr common_iterator(_Iter __i) : __hold_(in_place_type<_Iter>, std::move(__i)) {}
- _LIBCPP_HIDE_FROM_ABI constexpr common_iterator(_Sent __s) : __hold_(in_place_type<_Sent>, std::move(__s)) {}
+ constexpr common_iterator(_Iter __i) : __hold_(in_place_type<_Iter>, std::move(__i)) {}
+ constexpr common_iterator(_Sent __s) : __hold_(in_place_type<_Sent>, std::move(__s)) {}
template <class _I2, class _S2>
requires convertible_to<const _I2&, _Iter> && convertible_to<const _S2&, _Sent>
- _LIBCPP_HIDE_FROM_ABI constexpr common_iterator(const common_iterator<_I2, _S2>& __other)
+ constexpr common_iterator(const common_iterator<_I2, _S2>& __other)
: __hold_([&]() -> variant<_Iter, _Sent> {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!__other.__hold_.valueless_by_exception(), "Attempted to construct from a valueless common_iterator");
@@ -89,7 +87,7 @@ class common_iterator {
template <class _I2, class _S2>
requires convertible_to<const _I2&, _Iter> && convertible_to<const _S2&, _Sent> &&
assignable_from<_Iter&, const _I2&> && assignable_from<_Sent&, const _S2&>
- _LIBCPP_HIDE_FROM_ABI common_iterator& operator=(const common_iterator<_I2, _S2>& __other) {
+ common_iterator& operator=(const common_iterator<_I2, _S2>& __other) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!__other.__hold_.valueless_by_exception(), "Attempted to assign from a valueless common_iterator");
@@ -111,13 +109,13 @@ class common_iterator {
return *this;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*() {
+ [[nodiscard]] constexpr decltype(auto) operator*() {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
std::holds_alternative<_Iter>(__hold_), "Attempted to dereference a non-dereferenceable common_iterator");
return *std::__unchecked_get<_Iter>(__hold_);
}
- _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*() const
+ constexpr decltype(auto) operator*() const
requires __dereferenceable<const _Iter>
{
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
@@ -126,7 +124,7 @@ class common_iterator {
}
template <class _I2 = _Iter>
- _LIBCPP_HIDE_FROM_ABI auto operator->() const
+ auto operator->() const
requires indirectly_readable<const _I2> && (requires(const _I2& __i) {
__i.operator->();
} || is_reference_v<iter_reference_t<_I2>> || constructible_from<iter_value_t<_I2>, iter_reference_t<_I2>>)
@@ -143,14 +141,14 @@ class common_iterator {
}
}
- _LIBCPP_HIDE_FROM_ABI common_iterator& operator++() {
+ common_iterator& operator++() {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
std::holds_alternative<_Iter>(__hold_), "Attempted to increment a non-dereferenceable common_iterator");
++std::__unchecked_get<_Iter>(__hold_);
return *this;
}
- _LIBCPP_HIDE_FROM_ABI decltype(auto) operator++(int) {
+ decltype(auto) operator++(int) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
std::holds_alternative<_Iter>(__hold_), "Attempted to increment a non-dereferenceable common_iterator");
if constexpr (forward_iterator<_Iter>) {
@@ -170,8 +168,7 @@ class common_iterator {
template <class _I2, sentinel_for<_Iter> _S2>
requires sentinel_for<_Sent, _I2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool
- operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
+ friend constexpr bool operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!__x.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
@@ -191,8 +188,7 @@ class common_iterator {
template <class _I2, sentinel_for<_Iter> _S2>
requires sentinel_for<_Sent, _I2> && equality_comparable_with<_Iter, _I2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool
- operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
+ friend constexpr bool operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!__x.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
@@ -215,8 +211,7 @@ class common_iterator {
template <sized_sentinel_for<_Iter> _I2, sized_sentinel_for<_Iter> _S2>
requires sized_sentinel_for<_Sent, _I2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr iter_difference_t<_I2>
- operator-(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
+ friend constexpr iter_difference_t<_I2> operator-(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
!__x.__hold_.valueless_by_exception(), "Attempted to subtract from a valueless common_iterator");
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
@@ -237,7 +232,7 @@ class common_iterator {
return std::__unchecked_get<_Sent>(__x.__hold_) - std::__unchecked_get<_I2>(__y.__hold_);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr decltype(auto)
+ [[nodiscard]] friend constexpr decltype(auto)
iter_move(const common_iterator& __i) noexcept(noexcept(ranges::iter_move(std::declval<const _Iter&>())))
requires input_iterator<_Iter>
{
@@ -247,8 +242,7 @@ class common_iterator {
}
template <indirectly_swappable<_Iter> _I2, class _S2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr void
- iter_swap(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) noexcept(
+ friend constexpr void iter_swap(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) noexcept(
noexcept(ranges::iter_swap(std::declval<const _Iter&>(), std::declval<const _I2&>()))) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
std::holds_alternative<_Iter>(__x.__hold_), "Attempted to iter_swap a non-dereferenceable common_iterator");
diff --git a/libcxx/include/__iterator/counted_iterator.h b/libcxx/include/__iterator/counted_iterator.h
index 211670d7ad91f1..e5deed293c0874 100644
--- a/libcxx/include/__iterator/counted_iterator.h
+++ b/libcxx/include/__iterator/counted_iterator.h
@@ -76,60 +76,60 @@ class counted_iterator
using iterator_type = _Iter;
using difference_type = iter_difference_t<_Iter>;
- _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator()
+ constexpr counted_iterator()
requires default_initializable<_Iter>
= default;
- _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator(_Iter __iter, iter_difference_t<_Iter> __n)
+ constexpr counted_iterator(_Iter __iter, iter_difference_t<_Iter> __n)
: __current_(std::move(__iter)), __count_(__n) {
_LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0, "__n must not be negative.");
}
template <class _I2>
requires convertible_to<const _I2&, _Iter>
- _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator(const counted_iterator<_I2>& __other)
+ constexpr counted_iterator(const counted_iterator<_I2>& __other)
: __current_(__other.__current_), __count_(__other.__count_) {}
template <class _I2>
requires assignable_from<_Iter&, const _I2&>
- _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator& operator=(const counted_iterator<_I2>& __other) {
+ constexpr counted_iterator& operator=(const counted_iterator<_I2>& __other) {
__current_ = __other.__current_;
__count_ = __other.__count_;
return *this;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Iter& base() const& noexcept { return __current_; }
+ [[nodiscard]] constexpr const _Iter& base() const& noexcept { return __current_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Iter base() && { return std::move(__current_); }
+ [[nodiscard]] constexpr _Iter base() && { return std::move(__current_); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Iter> count() const noexcept { return __count_; }
+ [[nodiscard]] constexpr iter_difference_t<_Iter> count() const noexcept { return __count_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*() {
+ [[nodiscard]] constexpr decltype(auto) operator*() {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__count_ > 0, "Iterator is equal to or past end.");
return *__current_;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*() const
+ [[nodiscard]] constexpr decltype(auto) operator*() const
requires __dereferenceable<const _Iter>
{
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__count_ > 0, "Iterator is equal to or past end.");
return *__current_;
}
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator->() const noexcept
+ constexpr auto operator->() const noexcept
requires contiguous_iterator<_Iter>
{
return std::to_address(__current_);
}
- _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator& operator++() {
+ constexpr counted_iterator& operator++() {
_LIBCPP_ASSERT_UNCATEGORIZED(__count_ > 0, "Iterator already at or past end.");
++__current_;
--__count_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator++(int) {
+ constexpr decltype(auto) operator++(int) {
_LIBCPP_ASSERT_UNCATEGORIZED(__count_ > 0, "Iterator already at or past end.");
--__count_;
# if _LIBCPP_HAS_EXCEPTIONS
@@ -144,7 +144,7 @@ class counted_iterator
# endif // _LIBCPP_HAS_EXCEPTIONS
}
- _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator operator++(int)
+ constexpr counted_iterator operator++(int)
requires forward_iterator<_Iter>
{
_LIBCPP_ASSERT_UNCATEGORIZED(__count_ > 0, "Iterator already at or past end.");
@@ -153,7 +153,7 @@ class counted_iterator
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator& operator--()
+ constexpr counted_iterator& operator--()
requires bidirectional_iterator<_Iter>
{
--__current_;
@@ -161,7 +161,7 @@ class counted_iterator
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator operator--(int)
+ constexpr counted_iterator operator--(int)
requires bidirectional_iterator<_Iter>
{
counted_iterator __tmp = *this;
@@ -169,20 +169,19 @@ class counted_iterator
return __tmp;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator operator+(iter_difference_t<_Iter> __n) const
+ [[nodiscard]] constexpr counted_iterator operator+(iter_difference_t<_Iter> __n) const
requires random_access_iterator<_Iter>
{
return counted_iterator(__current_ + __n, __count_ - __n);
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr counted_iterator
- operator+(iter_difference_t<_Iter> __n, const counted_iterator& __x)
+ [[nodiscard]] friend constexpr counted_iterator operator+(iter_difference_t<_Iter> __n, const counted_iterator& __x)
requires random_access_iterator<_Iter>
{
return __x + __n;
}
- _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator& operator+=(iter_difference_t<_Iter> __n)
+ constexpr counted_iterator& operator+=(iter_difference_t<_Iter> __n)
requires random_access_iterator<_Iter>
{
_LIBCPP_ASSERT_UNCATEGORIZED(__n <= __count_, "Cannot advance iterator past end.");
@@ -191,29 +190,27 @@ class counted_iterator
return *this;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator operator-(iter_difference_t<_Iter> __n) const
+ [[nodiscard]] constexpr counted_iterator operator-(iter_difference_t<_Iter> __n) const
requires random_access_iterator<_Iter>
{
return counted_iterator(__current_ - __n, __count_ + __n);
}
template <common_with<_Iter> _I2>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr iter_difference_t<_I2>
+ [[nodiscard]] friend constexpr iter_difference_t<_I2>
operator-(const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs) {
return __rhs.__count_ - __lhs.__count_;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr iter_difference_t<_Iter>
- operator-(const counted_iterator& __lhs, default_sentinel_t) {
+ [[nodiscard]] friend constexpr iter_difference_t<_Iter> operator-(const counted_iterator& __lhs, default_sentinel_t) {
return -__lhs.__count_;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr iter_difference_t<_Iter>
- operator-(default_sentinel_t, const counted_iterator& __rhs) {
+ [[nodiscard]] friend constexpr iter_difference_t<_Iter> operator-(default_sentinel_t, const counted_iterator& __rhs) {
return __rhs.__count_;
}
- _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator& operator-=(iter_difference_t<_Iter> __n)
+ constexpr counted_iterator& operator-=(iter_difference_t<_Iter> __n)
requires random_access_iterator<_Iter>
{
_LIBCPP_ASSERT_UNCATEGORIZED(
@@ -226,7 +223,7 @@ class counted_iterator
return *this;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator[](iter_difference_t<_Iter> __n) const
+ [[nodiscard]] constexpr decltype(auto) operator[](iter_difference_t<_Iter> __n) const
requires random_access_iterator<_Iter>
{
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < __count_, "Subscript argument must be less than size.");
@@ -234,22 +231,18 @@ class counted_iterator
}
template <common_with<_Iter> _I2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool
- operator==(const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs) {
+ friend constexpr bool operator==(const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs) {
return __lhs.__count_ == __rhs.__count_;
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const counted_iterator& __lhs, default_sentinel_t) {
- return __lhs.__count_ == 0;
- }
+ friend constexpr bool operator==(const counted_iterator& __lhs, default_sentinel_t) { return __lhs.__count_ == 0; }
template <common_with<_Iter> _I2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr strong_ordering
- operator<=>(const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs) {
+ friend constexpr strong_ordering operator<=>(const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs) {
return __rhs.__count_ <=> __lhs.__count_;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr decltype(auto)
+ [[nodiscard]] friend constexpr decltype(auto)
iter_move(const counted_iterator& __i) noexcept(noexcept(ranges::iter_move(__i.__current_)))
requires input_iterator<_Iter>
{
@@ -258,7 +251,7 @@ class counted_iterator
}
template <indirectly_swappable<_Iter> _I2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr void
+ friend constexpr void
iter_swap(const counted_iterator& __x,
const counted_iterator<_I2>& __y) noexcept(noexcept(ranges::iter_swap(__x.__current_, __y.__current_))) {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
diff --git a/libcxx/include/__iterator/data.h b/libcxx/include/__iterator/data.h
index 7efa57e1a22a77..20ca9b3d6eb7c6 100644
--- a/libcxx/include/__iterator/data.h
+++ b/libcxx/include/__iterator/data.h
@@ -22,24 +22,22 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Cont>
-[[nodiscard]] constexpr _LIBCPP_HIDE_FROM_ABI auto data(_Cont& __c) noexcept(noexcept(__c.data()))
- -> decltype(__c.data()) {
+[[nodiscard]] constexpr auto data(_Cont& __c) noexcept(noexcept(__c.data())) -> decltype(__c.data()) {
return __c.data();
}
template <class _Cont>
-[[nodiscard]] constexpr _LIBCPP_HIDE_FROM_ABI auto data(const _Cont& __c) noexcept(noexcept(__c.data()))
- -> decltype(__c.data()) {
+[[nodiscard]] constexpr auto data(const _Cont& __c) noexcept(noexcept(__c.data())) -> decltype(__c.data()) {
return __c.data();
}
template <class _Tp, size_t _Sz>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Tp* data(_Tp (&__array)[_Sz]) noexcept {
+[[nodiscard]] constexpr _Tp* data(_Tp (&__array)[_Sz]) noexcept {
return __array;
}
template <class _Ep>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Ep* data(initializer_list<_Ep> __il) noexcept {
+[[nodiscard]] constexpr const _Ep* data(initializer_list<_Ep> __il) noexcept {
return __il.begin();
}
diff --git a/libcxx/include/__iterator/distance.h b/libcxx/include/__iterator/distance.h
index 1d1b37b7b662de..c47311f8894140 100644
--- a/libcxx/include/__iterator/distance.h
+++ b/libcxx/include/__iterator/distance.h
@@ -44,14 +44,12 @@ using __iter_distance_t _LIBCPP_NODEBUG = typename iterator_traits<_Iter>::diffe
#endif
template <class _RandIter, __enable_if_t<__has_random_access_iterator_category<_RandIter>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 __iter_distance_t<_RandIter>
-__distance(_RandIter __first, _RandIter __last) {
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 __iter_distance_t<_RandIter> __distance(_RandIter __first, _RandIter __last) {
return __last - __first;
}
template <class _InputIter, class _Sent>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 __iter_distance_t<_InputIter>
-__distance(_InputIter __first, _Sent __last) {
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 __iter_distance_t<_InputIter> __distance(_InputIter __first, _Sent __last) {
__iter_distance_t<_InputIter> __r(0);
#if _LIBCPP_STD_VER >= 20
if constexpr (same_as<_InputIter, _Sent> && __is_segmented_iterator_v<_InputIter>) {
@@ -68,8 +66,7 @@ __distance(_InputIter __first, _Sent __last) {
}
template <class _InputIter>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17
-typename iterator_traits<_InputIter>::difference_type
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX17 typename iterator_traits<_InputIter>::difference_type
distance(_InputIter __first, _InputIter __last) {
return std::__distance(__first, __last);
}
@@ -82,13 +79,12 @@ namespace ranges {
struct __distance {
template <class _Ip, sentinel_for<_Ip> _Sp>
requires(!sized_sentinel_for<_Sp, _Ip>)
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Ip> operator()(_Ip __first, _Sp __last) const {
+ [[nodiscard]] constexpr iter_difference_t<_Ip> operator()(_Ip __first, _Sp __last) const {
return std::__distance(std::move(__first), std::move(__last));
}
template <class _Ip, sized_sentinel_for<decay_t<_Ip>> _Sp>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<decay_t<_Ip>>
- operator()(_Ip&& __first, _Sp __last) const {
+ [[nodiscard]] constexpr iter_difference_t<decay_t<_Ip>> operator()(_Ip&& __first, _Sp __last) const {
if constexpr (!is_array_v<remove_reference_t<_Ip>>) {
return __last - __first;
} else {
@@ -97,7 +93,7 @@ struct __distance {
}
template <range _Rp>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr range_difference_t<_Rp> operator()(_Rp&& __r) const {
+ [[nodiscard]] constexpr range_difference_t<_Rp> operator()(_Rp&& __r) const {
if constexpr (sized_range<_Rp>) {
return static_cast<range_difference_t<_Rp>>(ranges::size(__r));
} else {
diff --git a/libcxx/include/__iterator/empty.h b/libcxx/include/__iterator/empty.h
index b763048f547e5a..cc4ee25ff3f5fc 100644
--- a/libcxx/include/__iterator/empty.h
+++ b/libcxx/include/__iterator/empty.h
@@ -22,18 +22,17 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Cont>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto
-empty(const _Cont& __c) noexcept(noexcept(__c.empty())) -> decltype(__c.empty()) {
+[[nodiscard]] constexpr auto empty(const _Cont& __c) noexcept(noexcept(__c.empty())) -> decltype(__c.empty()) {
return __c.empty();
}
template <class _Tp, size_t _Sz>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool empty(const _Tp (&)[_Sz]) noexcept {
+[[nodiscard]] constexpr bool empty(const _Tp (&)[_Sz]) noexcept {
return false;
}
template <class _Ep>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool empty(initializer_list<_Ep> __il) noexcept {
+[[nodiscard]] constexpr bool empty(initializer_list<_Ep> __il) noexcept {
return __il.size() == 0;
}
diff --git a/libcxx/include/__iterator/erase_if_container.h b/libcxx/include/__iterator/erase_if_container.h
index 8d92d3f1b9dbe2..45440e3f0886e1 100644
--- a/libcxx/include/__iterator/erase_if_container.h
+++ b/libcxx/include/__iterator/erase_if_container.h
@@ -22,7 +22,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Container, class _Predicate>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 typename _Container::size_type
+_LIBCPP_CONSTEXPR_SINCE_CXX26 typename _Container::size_type
__libcpp_erase_if_container(_Container& __c, _Predicate& __pred) {
typename _Container::size_type __old_size = __c.size();
diff --git a/libcxx/include/__iterator/front_insert_iterator.h b/libcxx/include/__iterator/front_insert_iterator.h
index 477f1c711256bb..09c4a3f20b4af2 100644
--- a/libcxx/include/__iterator/front_insert_iterator.h
+++ b/libcxx/include/__iterator/front_insert_iterator.h
@@ -44,30 +44,25 @@ class front_insert_iterator
typedef void reference;
typedef _Container container_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit front_insert_iterator(_Container& __x)
- : container(std::addressof(__x)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator&
- operator=(const typename _Container::value_type& __value) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit front_insert_iterator(_Container& __x) : container(std::addressof(__x)) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator=(const typename _Container::value_type& __value) {
container->push_front(__value);
return *this;
}
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator&
- operator=(typename _Container::value_type&& __value) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator=(typename _Container::value_type&& __value) {
container->push_front(std::move(__value));
return *this;
}
#endif // _LIBCPP_CXX03_LANG
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator*() {
- return *this;
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator++() { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator operator++(int) { return *this; }
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator*() { return *this; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator& operator++() { return *this; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator operator++(int) { return *this; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(front_insert_iterator);
template <class _Container>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator<_Container>
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX20 front_insert_iterator<_Container>
front_inserter(_Container& __x) {
return front_insert_iterator<_Container>(__x);
}
diff --git a/libcxx/include/__iterator/insert_iterator.h b/libcxx/include/__iterator/insert_iterator.h
index f70fe570722a0c..3c6b2047bf0cf3 100644
--- a/libcxx/include/__iterator/insert_iterator.h
+++ b/libcxx/include/__iterator/insert_iterator.h
@@ -54,30 +54,27 @@ class insert_iterator
typedef void reference;
typedef _Container container_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
- insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
: container(std::addressof(__x)), iter(__i) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator&
- operator=(const typename _Container::value_type& __value) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator=(const typename _Container::value_type& __value) {
iter = container->insert(iter, __value);
++iter;
return *this;
}
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator&
- operator=(typename _Container::value_type&& __value) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator=(typename _Container::value_type&& __value) {
iter = container->insert(iter, std::move(__value));
++iter;
return *this;
}
#endif // _LIBCPP_CXX03_LANG
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator*() { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++() { return *this; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++(int) { return *this; }
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator*() { return *this; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++() { return *this; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator& operator++(int) { return *this; }
};
template <class _Container>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator<_Container>
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX20 insert_iterator<_Container>
inserter(_Container& __x, __insert_iterator_iter_t<_Container> __i) {
return insert_iterator<_Container>(__x, __i);
}
diff --git a/libcxx/include/__iterator/istream_iterator.h b/libcxx/include/__iterator/istream_iterator.h
index 0b759eebfb00b3..1b2c276c1bc52f 100644
--- a/libcxx/include/__iterator/istream_iterator.h
+++ b/libcxx/include/__iterator/istream_iterator.h
@@ -48,11 +48,11 @@ class istream_iterator
_Tp __value_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR istream_iterator() : __in_stream_(nullptr), __value_() {}
+ _LIBCPP_CONSTEXPR istream_iterator() : __in_stream_(nullptr), __value_() {}
#if _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI constexpr istream_iterator(default_sentinel_t) : istream_iterator() {}
+ constexpr istream_iterator(default_sentinel_t) : istream_iterator() {}
#endif // _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI istream_iterator(istream_type& __s) : __in_stream_(std::addressof(__s)) {
+ istream_iterator(istream_type& __s) : __in_stream_(std::addressof(__s)) {
if (!(*__in_stream_ >> __value_))
__in_stream_ = nullptr;
}
@@ -60,40 +60,38 @@ class istream_iterator
// LWG3600 Changed the wording of the copy constructor. In libc++ this constructor
// can still be trivial after this change.
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const _Tp& operator*() const { return __value_; }
- _LIBCPP_HIDE_FROM_ABI const _Tp* operator->() const { return std::addressof((operator*())); }
- _LIBCPP_HIDE_FROM_ABI istream_iterator& operator++() {
+ [[__nodiscard__]] const _Tp& operator*() const { return __value_; }
+ const _Tp* operator->() const { return std::addressof((operator*())); }
+ istream_iterator& operator++() {
if (!(*__in_stream_ >> __value_))
__in_stream_ = nullptr;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI istream_iterator operator++(int) {
+ istream_iterator operator++(int) {
istream_iterator __t(*this);
++(*this);
return __t;
}
template <class _Up, class _CharU, class _TraitsU, class _DistanceU>
- friend _LIBCPP_HIDE_FROM_ABI bool operator==(const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __x,
- const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __y);
+ friend bool operator==(const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __x,
+ const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __y);
#if _LIBCPP_STD_VER >= 20
- friend _LIBCPP_HIDE_FROM_ABI bool operator==(const istream_iterator& __i, default_sentinel_t) {
- return __i.__in_stream_ == nullptr;
- }
+ friend bool operator==(const istream_iterator& __i, default_sentinel_t) { return __i.__in_stream_ == nullptr; }
#endif // _LIBCPP_STD_VER >= 20
};
template <class _Tp, class _CharT, class _Traits, class _Distance>
-inline _LIBCPP_HIDE_FROM_ABI bool operator==(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
- const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __y) {
+inline bool operator==(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
+ const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __y) {
return __x.__in_stream_ == __y.__in_stream_;
}
#if _LIBCPP_STD_VER <= 17
template <class _Tp, class _CharT, class _Traits, class _Distance>
-inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
- const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __y) {
+inline bool operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
+ const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __y) {
return !(__x == __y);
}
#endif // _LIBCPP_STD_VER <= 17
diff --git a/libcxx/include/__iterator/istreambuf_iterator.h b/libcxx/include/__iterator/istreambuf_iterator.h
index c554a05f6717c8..cba87e970fa41d 100644
--- a/libcxx/include/__iterator/istreambuf_iterator.h
+++ b/libcxx/include/__iterator/istreambuf_iterator.h
@@ -51,57 +51,53 @@ class istreambuf_iterator
class __proxy {
char_type __keep_;
streambuf_type* __sbuf_;
- _LIBCPP_HIDE_FROM_ABI explicit __proxy(char_type __c, streambuf_type* __s) : __keep_(__c), __sbuf_(__s) {}
+ explicit __proxy(char_type __c, streambuf_type* __s) : __keep_(__c), __sbuf_(__s) {}
friend class istreambuf_iterator;
public:
- _LIBCPP_HIDE_FROM_ABI char_type operator*() const { return __keep_; }
+ char_type operator*() const { return __keep_; }
};
- _LIBCPP_HIDE_FROM_ABI bool __test_for_eof() const {
+ bool __test_for_eof() const {
if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sgetc(), traits_type::eof()))
__sbuf_ = nullptr;
return __sbuf_ == nullptr;
}
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(nullptr) {}
+ _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(nullptr) {}
#if _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI constexpr istreambuf_iterator(default_sentinel_t) noexcept : istreambuf_iterator() {}
+ constexpr istreambuf_iterator(default_sentinel_t) noexcept : istreambuf_iterator() {}
#endif // _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI istreambuf_iterator(istream_type& __s) _NOEXCEPT : __sbuf_(__s.rdbuf()) {}
- _LIBCPP_HIDE_FROM_ABI istreambuf_iterator(streambuf_type* __s) _NOEXCEPT : __sbuf_(__s) {}
- _LIBCPP_HIDE_FROM_ABI istreambuf_iterator(const __proxy& __p) _NOEXCEPT : __sbuf_(__p.__sbuf_) {}
+ istreambuf_iterator(istream_type& __s) _NOEXCEPT : __sbuf_(__s.rdbuf()) {}
+ istreambuf_iterator(streambuf_type* __s) _NOEXCEPT : __sbuf_(__s) {}
+ istreambuf_iterator(const __proxy& __p) _NOEXCEPT : __sbuf_(__p.__sbuf_) {}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI char_type operator*() const {
- return static_cast<char_type>(__sbuf_->sgetc());
- }
- _LIBCPP_HIDE_FROM_ABI istreambuf_iterator& operator++() {
+ [[__nodiscard__]] char_type operator*() const { return static_cast<char_type>(__sbuf_->sgetc()); }
+ istreambuf_iterator& operator++() {
__sbuf_->sbumpc();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI __proxy operator++(int) { return __proxy(__sbuf_->sbumpc(), __sbuf_); }
+ __proxy operator++(int) { return __proxy(__sbuf_->sbumpc(), __sbuf_); }
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI bool equal(const istreambuf_iterator& __b) const {
+ [[__nodiscard__]] bool equal(const istreambuf_iterator& __b) const {
return __test_for_eof() == __b.__test_for_eof();
}
#if _LIBCPP_STD_VER >= 20
- friend _LIBCPP_HIDE_FROM_ABI bool operator==(const istreambuf_iterator& __i, default_sentinel_t) {
- return __i.__test_for_eof();
- }
+ friend bool operator==(const istreambuf_iterator& __i, default_sentinel_t) { return __i.__test_for_eof(); }
#endif // _LIBCPP_STD_VER >= 20
};
template <class _CharT, class _Traits>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline bool
operator==(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) {
return __a.equal(__b);
}
#if _LIBCPP_STD_VER <= 17
template <class _CharT, class _Traits>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline bool
operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) {
return !__a.equal(__b);
}
diff --git a/libcxx/include/__iterator/iter_move.h b/libcxx/include/__iterator/iter_move.h
index b371f09fe111fe..1b0eb7981d93a5 100644
--- a/libcxx/include/__iterator/iter_move.h
+++ b/libcxx/include/__iterator/iter_move.h
@@ -53,7 +53,7 @@ concept __move_deref = !__unqualified_iter_move<_Tp> && requires(_Tp&& __t) {
template <class _Tp>
concept __just_deref = !__unqualified_iter_move<_Tp> && !__move_deref<_Tp> && requires(_Tp&& __t) {
*__t;
- requires(!is_lvalue_reference_v<decltype(*__t)>);
+ requires(!is_lvalue_reference_v<decltype(* __t)>);
};
// [iterator.cust.move]
@@ -62,7 +62,7 @@ struct __fn {
// NOLINTBEGIN(libcpp-robust-against-adl) iter_move ADL calls should only be made through ranges::iter_move
template <class _Ip>
requires __unqualified_iter_move<_Ip>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const
+ [[nodiscard]] constexpr decltype(auto) operator()(_Ip&& __i) const
noexcept(noexcept(iter_move(std::forward<_Ip>(__i)))) {
return iter_move(std::forward<_Ip>(__i));
}
@@ -70,15 +70,15 @@ struct __fn {
template <class _Ip>
requires __move_deref<_Ip>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ip&& __i) const
- noexcept(noexcept(std::move(*std::forward<_Ip>(__i)))) -> decltype(std::move(*std::forward<_Ip>(__i))) {
+ [[nodiscard]] constexpr auto operator()(_Ip&& __i) const noexcept(noexcept(std::move(*std::forward<_Ip>(__i))))
+ -> decltype(std::move(*std::forward<_Ip>(__i))) {
return std::move(*std::forward<_Ip>(__i));
}
template <class _Ip>
requires __just_deref<_Ip>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ip&& __i) const
- noexcept(noexcept(*std::forward<_Ip>(__i))) -> decltype(*std::forward<_Ip>(__i)) {
+ [[nodiscard]] constexpr auto operator()(_Ip&& __i) const noexcept(noexcept(*std::forward<_Ip>(__i)))
+ -> decltype(*std::forward<_Ip>(__i)) {
return *std::forward<_Ip>(__i);
}
};
diff --git a/libcxx/include/__iterator/iter_swap.h b/libcxx/include/__iterator/iter_swap.h
index f4a5744a7eddbe..a7712160a3b057 100644
--- a/libcxx/include/__iterator/iter_swap.h
+++ b/libcxx/include/__iterator/iter_swap.h
@@ -56,7 +56,7 @@ struct __fn {
// NOLINTBEGIN(libcpp-robust-against-adl) iter_swap ADL calls should only be made through ranges::iter_swap
template <class _T1, class _T2>
requires __unqualified_iter_swap<_T1, _T2>
- _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_T1&& __x, _T2&& __y) const
+ constexpr void operator()(_T1&& __x, _T2&& __y) const
noexcept(noexcept(iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y)))) {
(void)iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y));
}
@@ -64,7 +64,7 @@ struct __fn {
template <class _T1, class _T2>
requires(!__unqualified_iter_swap<_T1, _T2>) && __readable_swappable<_T1, _T2>
- _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_T1&& __x, _T2&& __y) const
+ constexpr void operator()(_T1&& __x, _T2&& __y) const
noexcept(noexcept(ranges::swap(*std::forward<_T1>(__x), *std::forward<_T2>(__y)))) {
ranges::swap(*std::forward<_T1>(__x), *std::forward<_T2>(__y));
}
@@ -74,7 +74,7 @@ struct __fn {
!__readable_swappable<_T1, _T2>) && //
indirectly_movable_storable<_T1, _T2> && //
indirectly_movable_storable<_T2, _T1>
- _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_T1&& __x, _T2&& __y) const
+ constexpr void operator()(_T1&& __x, _T2&& __y) const
noexcept(noexcept(iter_value_t<_T2>(ranges::iter_move(__y))) && //
noexcept(*__y = ranges::iter_move(__x)) && //
noexcept(*std::forward<_T1>(__x) = std::declval<iter_value_t<_T2>>())) {
diff --git a/libcxx/include/__iterator/iterator_with_data.h b/libcxx/include/__iterator/iterator_with_data.h
index afdc0a4e12e21c..059710c91da90e 100644
--- a/libcxx/include/__iterator/iterator_with_data.h
+++ b/libcxx/include/__iterator/iterator_with_data.h
@@ -40,39 +40,38 @@ class __iterator_with_data {
using value_type = iter_value_t<_Iterator>;
using difference_type = iter_difference_t<_Iterator>;
- _LIBCPP_HIDE_FROM_ABI __iterator_with_data() = default;
+ __iterator_with_data() = default;
- constexpr _LIBCPP_HIDE_FROM_ABI __iterator_with_data(_Iterator __iter, _Data __data)
+ constexpr __iterator_with_data(_Iterator __iter, _Data __data)
: __iter_(std::move(__iter)), __data_(std::move(__data)) {}
- constexpr _LIBCPP_HIDE_FROM_ABI _Iterator __get_iter() const { return __iter_; }
+ constexpr _Iterator __get_iter() const { return __iter_; }
- constexpr _LIBCPP_HIDE_FROM_ABI _Data __get_data() && { return std::move(__data_); }
+ constexpr _Data __get_data() && { return std::move(__data_); }
- friend constexpr _LIBCPP_HIDE_FROM_ABI bool
- operator==(const __iterator_with_data& __lhs, const __iterator_with_data& __rhs) {
+ friend constexpr bool operator==(const __iterator_with_data& __lhs, const __iterator_with_data& __rhs) {
return __lhs.__iter_ == __rhs.__iter_;
}
- constexpr _LIBCPP_HIDE_FROM_ABI __iterator_with_data& operator++() {
+ constexpr __iterator_with_data& operator++() {
++__iter_;
return *this;
}
- constexpr _LIBCPP_HIDE_FROM_ABI __iterator_with_data operator++(int) {
+ constexpr __iterator_with_data operator++(int) {
auto __tmp = *this;
__iter_++;
return __tmp;
}
- constexpr _LIBCPP_HIDE_FROM_ABI __iterator_with_data& operator--()
+ constexpr __iterator_with_data& operator--()
requires bidirectional_iterator<_Iterator>
{
--__iter_;
return *this;
}
- constexpr _LIBCPP_HIDE_FROM_ABI __iterator_with_data operator--(int)
+ constexpr __iterator_with_data operator--(int)
requires bidirectional_iterator<_Iterator>
{
auto __tmp = *this;
@@ -80,14 +79,14 @@ class __iterator_with_data {
return __tmp;
}
- constexpr _LIBCPP_HIDE_FROM_ABI iter_reference_t<_Iterator> operator*() const { return *__iter_; }
+ constexpr iter_reference_t<_Iterator> operator*() const { return *__iter_; }
- _LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iterator>
+ friend constexpr iter_rvalue_reference_t<_Iterator>
iter_move(const __iterator_with_data& __iter) noexcept(noexcept(ranges::iter_move(__iter.__iter_))) {
return ranges::iter_move(__iter.__iter_);
}
- _LIBCPP_HIDE_FROM_ABI friend constexpr void
+ friend constexpr void
iter_swap(const __iterator_with_data& __lhs,
const __iterator_with_data& __rhs) noexcept(noexcept(ranges::iter_swap(__lhs.__iter_, __rhs.__iter_)))
requires indirectly_swappable<_Iterator>
diff --git a/libcxx/include/__iterator/move_iterator.h b/libcxx/include/__iterator/move_iterator.h
index aa5570c018737e..aa4ee94b45a247 100644
--- a/libcxx/include/__iterator/move_iterator.h
+++ b/libcxx/include/__iterator/move_iterator.h
@@ -72,7 +72,7 @@ class move_iterator
#if _LIBCPP_STD_VER >= 20
private:
- _LIBCPP_HIDE_FROM_ABI static constexpr auto __get_iter_concept() {
+ static constexpr auto __get_iter_concept() {
if constexpr (random_access_iterator<_Iter>) {
return random_access_iterator_tag{};
} else if constexpr (bidirectional_iterator<_Iter>) {
@@ -109,42 +109,40 @@ class move_iterator
reference;
#endif // _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 explicit move_iterator(_Iter __i) : __current_(std::move(__i)) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 explicit move_iterator(_Iter __i) : __current_(std::move(__i)) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator++() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator++() {
++__current_;
return *this;
}
- _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pointer operator->() const {
- return __current_;
- }
+ _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_CONSTEXPR_SINCE_CXX17 pointer operator->() const { return __current_; }
#if _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI constexpr move_iterator()
+ constexpr move_iterator()
requires default_initializable<_Iter>
: __current_() {}
template <class _Up>
requires(!_IsSame<_Up, _Iter>::value) && convertible_to<const _Up&, _Iter>
- _LIBCPP_HIDE_FROM_ABI constexpr move_iterator(const move_iterator<_Up>& __u) : __current_(__u.base()) {}
+ constexpr move_iterator(const move_iterator<_Up>& __u) : __current_(__u.base()) {}
template <class _Up>
requires(!_IsSame<_Up, _Iter>::value) && convertible_to<const _Up&, _Iter> && assignable_from<_Iter&, const _Up&>
- _LIBCPP_HIDE_FROM_ABI constexpr move_iterator& operator=(const move_iterator<_Up>& __u) {
+ constexpr move_iterator& operator=(const move_iterator<_Up>& __u) {
__current_ = __u.base();
return *this;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr const _Iter& base() const& noexcept { return __current_; }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Iter base() && { return std::move(__current_); }
+ [[nodiscard]] constexpr const _Iter& base() const& noexcept { return __current_; }
+ [[nodiscard]] constexpr _Iter base() && { return std::move(__current_); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr reference operator*() const { return ranges::iter_move(__current_); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr reference operator[](difference_type __n) const {
+ [[nodiscard]] constexpr reference operator*() const { return ranges::iter_move(__current_); }
+ [[nodiscard]] constexpr reference operator[](difference_type __n) const {
return ranges::iter_move(__current_ + __n);
}
- _LIBCPP_HIDE_FROM_ABI constexpr auto operator++(int)
+ constexpr auto operator++(int)
requires forward_iterator<_Iter>
{
move_iterator __tmp(*this);
@@ -152,93 +150,89 @@ class move_iterator
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI constexpr void operator++(int) { ++__current_; }
+ constexpr void operator++(int) { ++__current_; }
#else
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator() : __current_() {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator() : __current_() {}
template <class _Up, __enable_if_t< !is_same<_Up, _Iter>::value && is_convertible<const _Up&, _Iter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator(const move_iterator<_Up>& __u)
- : __current_(__u.base()) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator(const move_iterator<_Up>& __u) : __current_(__u.base()) {}
template <class _Up,
__enable_if_t< !is_same<_Up, _Iter>::value && is_convertible<const _Up&, _Iter>::value &&
is_assignable<_Iter&, const _Up&>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator=(const move_iterator<_Up>& __u) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator=(const move_iterator<_Up>& __u) {
__current_ = __u.base();
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _Iter base() const { return __current_; }
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 _Iter base() const { return __current_; }
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator*() const {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator*() const {
return static_cast<reference>(*__current_);
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference
- operator[](difference_type __n) const {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator[](difference_type __n) const {
return static_cast<reference>(__current_[__n]);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator operator++(int) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator operator++(int) {
move_iterator __tmp(*this);
++__current_;
return __tmp;
}
#endif // _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator--() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator--() {
--__current_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator operator--(int) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator operator--(int) {
move_iterator __tmp(*this);
--__current_;
return __tmp;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator
- operator+(difference_type __n) const {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator operator+(difference_type __n) const {
return move_iterator(__current_ + __n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator+=(difference_type __n) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator+=(difference_type __n) {
__current_ += __n;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator
- operator-(difference_type __n) const {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator operator-(difference_type __n) const {
return move_iterator(__current_ - __n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator-=(difference_type __n) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator& operator-=(difference_type __n) {
__current_ -= __n;
return *this;
}
#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)
+ friend constexpr bool operator==(const move_iterator& __x, const move_sentinel<_Sent>& __y)
requires __move_iter_comparable<_Iter, _Sent>
{
return __x.base() == __y.base();
}
template <sized_sentinel_for<_Iter> _Sent>
- [[nodiscard]] friend _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Iter>
+ [[nodiscard]] friend constexpr iter_difference_t<_Iter>
operator-(const move_sentinel<_Sent>& __x, const move_iterator& __y) {
return __x.base() - __y.base();
}
template <sized_sentinel_for<_Iter> _Sent>
- [[nodiscard]] friend _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Iter>
+ [[nodiscard]] friend constexpr iter_difference_t<_Iter>
operator-(const move_iterator& __x, const move_sentinel<_Sent>& __y) {
return __x.base() - __y.base();
}
- [[nodiscard]] friend _LIBCPP_HIDE_FROM_ABI constexpr iter_rvalue_reference_t<_Iter>
+ [[nodiscard]] friend constexpr iter_rvalue_reference_t<_Iter>
iter_move(const move_iterator& __i) noexcept(noexcept(ranges::iter_move(__i.__current_))) {
return ranges::iter_move(__i.__current_);
}
template <indirectly_swappable<_Iter> _It2>
- friend _LIBCPP_HIDE_FROM_ABI constexpr void
+ friend constexpr void
iter_swap(const move_iterator& __x,
const move_iterator<_It2>& __y) noexcept(noexcept(ranges::iter_swap(__x.__current_, __y.__current_))) {
return ranges::iter_swap(__x.__current_, __y.__current_);
@@ -254,62 +248,61 @@ class move_iterator
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(move_iterator);
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
operator==(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() == __y.base();
}
#if _LIBCPP_STD_VER <= 17
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
+inline
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 bool operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() != __y.base();
}
#endif // _LIBCPP_STD_VER <= 17
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
-operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
+inline
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 bool operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() < __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
operator>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() > __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
operator<=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() <= __y.base();
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
operator>=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() >= __y.base();
}
#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> {
+inline 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 >= 20
#ifndef _LIBCPP_CXX03_LANG
template <class _Iter1, class _Iter2>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX17 auto operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
- -> decltype(__x.base() - __y.base()) {
+[[__nodiscard__]] inline
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 auto operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
+ -> decltype(__x.base() - __y.base()) {
return __x.base() - __y.base();
}
#else
template <class _Iter1, class _Iter2>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI typename move_iterator<_Iter1>::difference_type
+[[__nodiscard__]] inline typename move_iterator<_Iter1>::difference_type
operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
return __x.base() - __y.base();
}
@@ -317,7 +310,7 @@ operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) {
#if _LIBCPP_STD_VER >= 20
template <class _Iter>
-[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI constexpr move_iterator<_Iter>
+[[nodiscard]] inline constexpr move_iterator<_Iter>
operator+(iter_difference_t<_Iter> __n, const move_iterator<_Iter>& __x)
requires requires {
{ __x.base() + __n } -> same_as<_Iter>;
@@ -327,7 +320,7 @@ operator+(iter_difference_t<_Iter> __n, const move_iterator<_Iter>& __x)
}
#else
template <class _Iter>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator<_Iter>
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator<_Iter>
operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterator<_Iter>& __x) {
return move_iterator<_Iter>(__x.base() + __n);
}
@@ -340,8 +333,7 @@ inline constexpr bool disable_sized_sentinel_for<move_iterator<_Iter1>, move_ite
#endif // _LIBCPP_STD_VER >= 20
template <class _Iter>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator<_Iter> make_move_iterator(_Iter __i) {
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX17 move_iterator<_Iter> make_move_iterator(_Iter __i) {
return move_iterator<_Iter>(std::move(__i));
}
diff --git a/libcxx/include/__iterator/move_sentinel.h b/libcxx/include/__iterator/move_sentinel.h
index 876b2b24507c7c..b715aa06206424 100644
--- a/libcxx/include/__iterator/move_sentinel.h
+++ b/libcxx/include/__iterator/move_sentinel.h
@@ -29,22 +29,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <semiregular _Sent>
class move_sentinel {
public:
- _LIBCPP_HIDE_FROM_ABI move_sentinel() = default;
+ move_sentinel() = default;
- _LIBCPP_HIDE_FROM_ABI constexpr explicit move_sentinel(_Sent __s) : __last_(std::move(__s)) {}
+ constexpr explicit move_sentinel(_Sent __s) : __last_(std::move(__s)) {}
template <class _S2>
requires convertible_to<const _S2&, _Sent>
- _LIBCPP_HIDE_FROM_ABI constexpr move_sentinel(const move_sentinel<_S2>& __s) : __last_(__s.base()) {}
+ constexpr move_sentinel(const move_sentinel<_S2>& __s) : __last_(__s.base()) {}
template <class _S2>
requires assignable_from<_Sent&, const _S2&>
- _LIBCPP_HIDE_FROM_ABI constexpr move_sentinel& operator=(const move_sentinel<_S2>& __s) {
+ constexpr move_sentinel& operator=(const move_sentinel<_S2>& __s) {
__last_ = __s.base();
return *this;
}
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Sent base() const { return __last_; }
+ [[nodiscard]] constexpr _Sent base() const { return __last_; }
private:
_Sent __last_ = _Sent();
diff --git a/libcxx/include/__iterator/next.h b/libcxx/include/__iterator/next.h
index 1143ab31ff7c2e..21702f16112065 100644
--- a/libcxx/include/__iterator/next.h
+++ b/libcxx/include/__iterator/next.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) {
std::advance(__x, __n);
return __x;
@@ -37,26 +37,25 @@ next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n =
namespace ranges {
struct __next {
template <input_or_output_iterator _Ip>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x) const {
+ [[nodiscard]] constexpr _Ip operator()(_Ip __x) const {
++__x;
return __x;
}
template <input_or_output_iterator _Ip>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n) const {
+ [[nodiscard]] constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n) const {
ranges::advance(__x, __n);
return __x;
}
template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, _Sp __bound_sentinel) const {
+ [[nodiscard]] constexpr _Ip operator()(_Ip __x, _Sp __bound_sentinel) const {
ranges::advance(__x, __bound_sentinel);
return __x;
}
template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip
- operator()(_Ip __x, iter_difference_t<_Ip> __n, _Sp __bound_sentinel) const {
+ [[nodiscard]] constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n, _Sp __bound_sentinel) const {
ranges::advance(__x, __n, __bound_sentinel);
return __x;
}
diff --git a/libcxx/include/__iterator/ostream_iterator.h b/libcxx/include/__iterator/ostream_iterator.h
index ba47fce95e8459..98cfab783f511a 100644
--- a/libcxx/include/__iterator/ostream_iterator.h
+++ b/libcxx/include/__iterator/ostream_iterator.h
@@ -46,22 +46,20 @@ class ostream_iterator
const char_type* __delim_;
public:
- _LIBCPP_HIDE_FROM_ABI ostream_iterator(ostream_type& __s) _NOEXCEPT
- : __out_stream_(std::addressof(__s)),
- __delim_(nullptr) {}
- _LIBCPP_HIDE_FROM_ABI ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT
+ ostream_iterator(ostream_type& __s) _NOEXCEPT : __out_stream_(std::addressof(__s)), __delim_(nullptr) {}
+ ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT
: __out_stream_(std::addressof(__s)),
__delim_(__delimiter) {}
- _LIBCPP_HIDE_FROM_ABI ostream_iterator& operator=(const _Tp& __value) {
+ ostream_iterator& operator=(const _Tp& __value) {
*__out_stream_ << __value;
if (__delim_)
*__out_stream_ << __delim_;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI ostream_iterator& operator*() { return *this; }
- _LIBCPP_HIDE_FROM_ABI ostream_iterator& operator++() { return *this; }
- _LIBCPP_HIDE_FROM_ABI ostream_iterator& operator++(int) { return *this; }
+ [[__nodiscard__]] ostream_iterator& operator*() { return *this; }
+ ostream_iterator& operator++() { return *this; }
+ ostream_iterator& operator++(int) { return *this; }
};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__iterator/ostreambuf_iterator.h b/libcxx/include/__iterator/ostreambuf_iterator.h
index a23f0b1f65f937..ab061ff80bc4a1 100644
--- a/libcxx/include/__iterator/ostreambuf_iterator.h
+++ b/libcxx/include/__iterator/ostreambuf_iterator.h
@@ -50,21 +50,21 @@ class ostreambuf_iterator
streambuf_type* __sbuf_;
public:
- _LIBCPP_HIDE_FROM_ABI ostreambuf_iterator(ostream_type& __s) _NOEXCEPT : __sbuf_(__s.rdbuf()) {}
- _LIBCPP_HIDE_FROM_ABI ostreambuf_iterator(streambuf_type* __s) _NOEXCEPT : __sbuf_(__s) {}
- _LIBCPP_HIDE_FROM_ABI ostreambuf_iterator& operator=(_CharT __c) {
+ ostreambuf_iterator(ostream_type& __s) _NOEXCEPT : __sbuf_(__s.rdbuf()) {}
+ ostreambuf_iterator(streambuf_type* __s) _NOEXCEPT : __sbuf_(__s) {}
+ ostreambuf_iterator& operator=(_CharT __c) {
if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sputc(__c), traits_type::eof()))
__sbuf_ = nullptr;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI ostreambuf_iterator& operator*() { return *this; }
- _LIBCPP_HIDE_FROM_ABI ostreambuf_iterator& operator++() { return *this; }
- _LIBCPP_HIDE_FROM_ABI ostreambuf_iterator& operator++(int) { return *this; }
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI bool failed() const _NOEXCEPT { return __sbuf_ == nullptr; }
+ [[__nodiscard__]] ostreambuf_iterator& operator*() { return *this; }
+ ostreambuf_iterator& operator++() { return *this; }
+ ostreambuf_iterator& operator++(int) { return *this; }
+ [[__nodiscard__]] bool failed() const _NOEXCEPT { return __sbuf_ == nullptr; }
#if _LIBCPP_HAS_LOCALIZATION
template <class _Ch, class _Tr>
- friend _LIBCPP_HIDE_FROM_ABI ostreambuf_iterator<_Ch, _Tr> __pad_and_output(
+ friend ostreambuf_iterator<_Ch, _Tr> __pad_and_output(
ostreambuf_iterator<_Ch, _Tr> __s, const _Ch* __ob, const _Ch* __op, const _Ch* __oe, ios_base& __iob, _Ch __fl);
#endif // _LIBCPP_HAS_LOCALIZATION
@@ -78,7 +78,7 @@ struct __specialized_algorithm<_Algorithm::__copy,
__single_iterator<ostreambuf_iterator<_CharT, _Traits> > > {
static const bool __has_algorithm = is_same<const _CharT, const _InCharT>::value;
- _LIBCPP_HIDE_FROM_ABI static __in_out_result<_InCharT*, ostreambuf_iterator<_CharT, _Traits> >
+ static __in_out_result<_InCharT*, ostreambuf_iterator<_CharT, _Traits> >
operator()(_InCharT* __first, _InCharT* __last, ostreambuf_iterator<_CharT, _Traits> __result) {
auto __size = __last - __first;
if (__result.__sbuf_ && __size > 0) {
diff --git a/libcxx/include/__iterator/prev.h b/libcxx/include/__iterator/prev.h
index 97139e067c8969..4f362edbf02780 100644
--- a/libcxx/include/__iterator/prev.h
+++ b/libcxx/include/__iterator/prev.h
@@ -28,7 +28,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter
prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n) {
std::advance(__x, -__n);
return __x;
@@ -38,7 +38,7 @@ prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n)
// It is unclear what the implications of "BidirectionalIterator" in the standard are.
// However, calling std::prev(non-bidi-iterator) is obviously an error and we should catch it at compile time.
template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIter>::value, int> = 0>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter prev(_InputIter __it) {
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 _InputIter prev(_InputIter __it) {
static_assert(__has_bidirectional_iterator_category<_InputIter>::value,
"Attempt to prev(it) with a non-bidirectional iterator");
return std::prev(std::move(__it), 1);
@@ -51,20 +51,19 @@ template <class _InputIter, __enable_if_t<__has_input_iterator_category<_InputIt
namespace ranges {
struct __prev {
template <bidirectional_iterator _Ip>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x) const {
+ [[nodiscard]] constexpr _Ip operator()(_Ip __x) const {
--__x;
return __x;
}
template <bidirectional_iterator _Ip>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n) const {
+ [[nodiscard]] constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n) const {
ranges::advance(__x, -__n);
return __x;
}
template <bidirectional_iterator _Ip>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Ip
- operator()(_Ip __x, iter_difference_t<_Ip> __n, _Ip __bound_iter) const {
+ [[nodiscard]] constexpr _Ip operator()(_Ip __x, iter_difference_t<_Ip> __n, _Ip __bound_iter) const {
ranges::advance(__x, -__n, __bound_iter);
return __x;
}
diff --git a/libcxx/include/__iterator/reverse_access.h b/libcxx/include/__iterator/reverse_access.h
index 972e8e6965ec60..09a0d470ed25ef 100644
--- a/libcxx/include/__iterator/reverse_access.h
+++ b/libcxx/include/__iterator/reverse_access.h
@@ -23,67 +23,64 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, size_t _Np>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<_Tp*>
-rbegin(_Tp (&__array)[_Np]) noexcept {
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<_Tp*> rbegin(_Tp (&__array)[_Np]) noexcept {
return reverse_iterator<_Tp*>(__array + _Np);
}
template <class _Tp, size_t _Np>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<_Tp*>
-rend(_Tp (&__array)[_Np]) noexcept {
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<_Tp*> rend(_Tp (&__array)[_Np]) noexcept {
return reverse_iterator<_Tp*>(__array);
}
template <class _Ep>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<const _Ep*>
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<const _Ep*>
rbegin(initializer_list<_Ep> __il) noexcept {
return reverse_iterator<const _Ep*>(__il.end());
}
template <class _Ep>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<const _Ep*>
-rend(initializer_list<_Ep> __il) noexcept {
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<const _Ep*> rend(initializer_list<_Ep> __il) noexcept {
return reverse_iterator<const _Ep*>(__il.begin());
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto rbegin(_Cp& __c) //
- noexcept(noexcept(__c.rbegin())) //
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 auto rbegin(_Cp& __c) //
+ noexcept(noexcept(__c.rbegin())) //
-> decltype(/*-*/ __c.rbegin()) {
return /*--------*/ __c.rbegin();
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto rbegin(const _Cp& __c) //
- noexcept(noexcept(__c.rbegin())) //
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 auto rbegin(const _Cp& __c) //
+ noexcept(noexcept(__c.rbegin())) //
-> decltype(/*-*/ __c.rbegin()) {
return /*--------*/ __c.rbegin();
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto rend(_Cp& __c) //
- noexcept(noexcept(__c.rend())) //
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 auto rend(_Cp& __c) //
+ noexcept(noexcept(__c.rend())) //
-> decltype(/*-*/ __c.rend()) {
return /*--------*/ __c.rend();
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto rend(const _Cp& __c) //
- noexcept(noexcept(__c.rend())) //
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 auto rend(const _Cp& __c) //
+ noexcept(noexcept(__c.rend())) //
-> decltype(/*-*/ __c.rend()) {
return /*--------*/ __c.rend();
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto crbegin(const _Cp& __c) //
- noexcept(noexcept(std::rbegin(__c))) //
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 auto crbegin(const _Cp& __c) //
+ noexcept(noexcept(std::rbegin(__c))) //
-> decltype(/*-*/ std::rbegin(__c)) {
return /*--------*/ std::rbegin(__c);
}
template <class _Cp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto crend(const _Cp& __c) //
- noexcept(noexcept(std::rend(__c))) //
+[[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 auto crend(const _Cp& __c) //
+ noexcept(noexcept(std::rend(__c))) //
-> decltype(/*-*/ std::rend(__c)) {
return /*--------*/ std::rend(__c);
}
diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h
index 64bdaf9ae58961..964e975641ddc6 100644
--- a/libcxx/include/__iterator/reverse_iterator.h
+++ b/libcxx/include/__iterator/reverse_iterator.h
@@ -78,48 +78,47 @@ class reverse_iterator
#endif
#ifndef _LIBCPP_ABI_NO_REVERSE_ITERATOR_SECOND_MEMBER
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator() : __t_(), current() {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator() : __t_(), current() {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 explicit reverse_iterator(_Iter __x) : __t_(__x), current(__x) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 explicit reverse_iterator(_Iter __x) : __t_(__x), current(__x) {}
template <class _Up, __enable_if_t<!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator(const reverse_iterator<_Up>& __u)
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator(const reverse_iterator<_Up>& __u)
: __t_(__u.base()), current(__u.base()) {}
template <class _Up,
__enable_if_t<!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value &&
is_assignable<_Iter&, _Up const&>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
__t_ = current = __u.base();
return *this;
}
#else
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator() : current() {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator() : current() {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 explicit reverse_iterator(_Iter __x) : current(__x) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 explicit reverse_iterator(_Iter __x) : current(__x) {}
template <class _Up, __enable_if_t<!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator(const reverse_iterator<_Up>& __u)
- : current(__u.base()) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator(const reverse_iterator<_Up>& __u) : current(__u.base()) {}
template <class _Up,
__enable_if_t<!is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value &&
is_assignable<_Iter&, _Up const&>::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
current = __u.base();
return *this;
}
#endif
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 _Iter base() const { return current; }
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator*() const {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 _Iter base() const { return current; }
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator*() const {
_Iter __tmp = current;
return *--__tmp;
}
#if _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI constexpr pointer operator->() const
+ constexpr pointer operator->() const
requires is_pointer_v<_Iter> || requires(const _Iter __i) { __i.operator->(); }
{
_Iter __tmp = current;
@@ -131,59 +130,55 @@ class reverse_iterator
}
}
#else
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pointer operator->() const { return std::addressof(operator*()); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 pointer operator->() const { return std::addressof(operator*()); }
#endif // _LIBCPP_STD_VER >= 20
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator++() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator++() {
--current;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator operator++(int) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator operator++(int) {
reverse_iterator __tmp(*this);
--current;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator--() {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator--() {
++current;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator operator--(int) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator operator--(int) {
reverse_iterator __tmp(*this);
++current;
return __tmp;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator
- operator+(difference_type __n) const {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator operator+(difference_type __n) const {
return reverse_iterator(current - __n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator+=(difference_type __n) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator+=(difference_type __n) {
current -= __n;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator
- operator-(difference_type __n) const {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator operator-(difference_type __n) const {
return reverse_iterator(current + __n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator-=(difference_type __n) {
+ _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator& operator-=(difference_type __n) {
current += __n;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reference
- operator[](difference_type __n) const {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX17 reference operator[](difference_type __n) const {
return *(*this + __n);
}
#if _LIBCPP_STD_VER >= 20
[[nodiscard]]
- _LIBCPP_HIDE_FROM_ABI friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const reverse_iterator& __i) noexcept(
+ friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const reverse_iterator& __i) noexcept(
is_nothrow_copy_constructible_v<_Iter> && noexcept(ranges::iter_move(--std::declval<_Iter&>()))) {
auto __tmp = __i.base();
return ranges::iter_move(--__tmp);
}
template <indirectly_swappable<_Iter> _Iter2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr void
- iter_swap(const reverse_iterator& __x, const reverse_iterator<_Iter2>& __y) noexcept(
+ friend constexpr void iter_swap(const reverse_iterator& __x, const reverse_iterator<_Iter2>& __y) noexcept(
is_nothrow_copy_constructible_v<_Iter> && is_nothrow_copy_constructible_v<_Iter2> &&
noexcept(ranges::iter_swap(--std::declval<_Iter&>(), --std::declval<_Iter2&>()))) {
auto __xtmp = __x.base();
@@ -194,7 +189,7 @@ class reverse_iterator
};
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER >= 20
requires requires {
@@ -206,7 +201,7 @@ operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER >= 20
requires requires {
@@ -218,7 +213,7 @@ operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& _
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER >= 20
requires requires {
@@ -230,7 +225,7 @@ operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER >= 20
requires requires {
@@ -242,7 +237,7 @@ operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& _
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER >= 20
requires requires {
@@ -254,7 +249,7 @@ operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
}
template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
+inline _LIBCPP_CONSTEXPR_SINCE_CXX17 bool
operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
#if _LIBCPP_STD_VER >= 20
requires requires {
@@ -267,7 +262,7 @@ operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
#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>
+constexpr compare_three_way_result_t<_Iter1, _Iter2>
operator<=>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) {
return __y.base() <=> __x.base();
}
@@ -275,21 +270,21 @@ operator<=>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
#ifndef _LIBCPP_CXX03_LANG
template <class _Iter1, class _Iter2>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX17 auto operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX17 auto
+operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-> decltype(__y.base() - __x.base()) {
return __y.base() - __x.base();
}
#else
template <class _Iter1, class _Iter2>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI typename reverse_iterator<_Iter1>::difference_type
+[[__nodiscard__]] inline typename reverse_iterator<_Iter1>::difference_type
operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) {
return __y.base() - __x.base();
}
#endif
template <class _Iter>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<_Iter>
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<_Iter>
operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_iterator<_Iter>& __x) {
return reverse_iterator<_Iter>(__x.base() - __n);
}
@@ -302,8 +297,7 @@ inline constexpr bool disable_sized_sentinel_for<reverse_iterator<_Iter1>, rever
#if _LIBCPP_STD_VER >= 14
template <class _Iter>
-[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<_Iter> make_reverse_iterator(_Iter __i) {
+[[__nodiscard__]] inline _LIBCPP_CONSTEXPR_SINCE_CXX17 reverse_iterator<_Iter> make_reverse_iterator(_Iter __i) {
return reverse_iterator<_Iter>(__i);
}
#endif
@@ -313,13 +307,12 @@ struct __unwrap_iter_impl<reverse_iterator<reverse_iterator<_Iter> >, __b> {
using _UnwrappedIter _LIBCPP_NODEBUG = decltype(__unwrap_iter_impl<_Iter>::__unwrap(std::declval<_Iter>()));
using _ReverseWrapper _LIBCPP_NODEBUG = reverse_iterator<reverse_iterator<_Iter> >;
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ReverseWrapper
- __rewrap(_ReverseWrapper __orig_iter, _UnwrappedIter __unwrapped_iter) {
+ static _LIBCPP_CONSTEXPR _ReverseWrapper __rewrap(_ReverseWrapper __orig_iter, _UnwrappedIter __unwrapped_iter) {
return _ReverseWrapper(
reverse_iterator<_Iter>(__unwrap_iter_impl<_Iter>::__rewrap(__orig_iter.base().base(), __unwrapped_iter)));
}
- static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _UnwrappedIter __unwrap(_ReverseWrapper __i) _NOEXCEPT {
+ static _LIBCPP_CONSTEXPR _UnwrappedIter __unwrap(_ReverseWrapper __i) _NOEXCEPT {
return __unwrap_iter_impl<_Iter>::__unwrap(__i.base().base());
}
};
diff --git a/libcxx/include/__iterator/size.h b/libcxx/include/__iterator/size.h
index eb441e25b0197c..2367f4fd574f33 100644
--- a/libcxx/include/__iterator/size.h
+++ b/libcxx/include/__iterator/size.h
@@ -26,18 +26,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Cont>
[[nodiscard]]
-_LIBCPP_HIDE_FROM_ABI constexpr auto size(const _Cont& __c) noexcept(noexcept(__c.size())) -> decltype(__c.size()) {
+constexpr auto size(const _Cont& __c) noexcept(noexcept(__c.size())) -> decltype(__c.size()) {
return __c.size();
}
template <class _Tp, size_t _Sz>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr size_t size(const _Tp (&)[_Sz]) noexcept {
+[[nodiscard]] constexpr size_t size(const _Tp (&)[_Sz]) noexcept {
return _Sz;
}
# if _LIBCPP_STD_VER >= 20
template <class _Cont>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto ssize(const _Cont& __c) noexcept(
+[[nodiscard]] constexpr auto ssize(const _Cont& __c) noexcept(
noexcept(static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size())))
-> common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>> {
return static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size());
@@ -48,7 +48,7 @@ template <class _Cont>
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wsign-conversion")
template <class _Tp, ptrdiff_t _Sz>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr ptrdiff_t ssize(const _Tp (&)[_Sz]) noexcept {
+[[nodiscard]] constexpr ptrdiff_t ssize(const _Tp (&)[_Sz]) noexcept {
return _Sz;
}
_LIBCPP_DIAGNOSTIC_POP
diff --git a/libcxx/include/__iterator/static_bounded_iter.h b/libcxx/include/__iterator/static_bounded_iter.h
index a048073b5a897c..97e1c722e7ac18 100644
--- a/libcxx/include/__iterator/static_bounded_iter.h
+++ b/libcxx/include/__iterator/static_bounded_iter.h
@@ -37,15 +37,15 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Iterator, size_t _Size>
struct __static_bounded_iter_storage {
- _LIBCPP_HIDE_FROM_ABI __static_bounded_iter_storage() = default;
- _LIBCPP_HIDE_FROM_ABI
+ __static_bounded_iter_storage() = default;
+
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __static_bounded_iter_storage(_Iterator __current, _Iterator __begin)
: __current_(__current), __begin_(__begin) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator& __current() _NOEXCEPT { return __current_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __current() const _NOEXCEPT { return __current_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __begin() const _NOEXCEPT { return __begin_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __end() const _NOEXCEPT { return __begin_ + _Size; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator& __current() _NOEXCEPT { return __current_; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __current() const _NOEXCEPT { return __current_; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __begin() const _NOEXCEPT { return __begin_; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __end() const _NOEXCEPT { return __begin_ + _Size; }
private:
_Iterator __current_; // current iterator
@@ -54,15 +54,15 @@ struct __static_bounded_iter_storage {
template <class _Iterator>
struct __static_bounded_iter_storage<_Iterator, 0> {
- _LIBCPP_HIDE_FROM_ABI __static_bounded_iter_storage() = default;
- _LIBCPP_HIDE_FROM_ABI
+ __static_bounded_iter_storage() = default;
+
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __static_bounded_iter_storage(_Iterator __current, _Iterator /* __begin */)
: __current_(__current) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator& __current() _NOEXCEPT { return __current_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __current() const _NOEXCEPT { return __current_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __begin() const _NOEXCEPT { return __current_; }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __end() const _NOEXCEPT { return __current_; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator& __current() _NOEXCEPT { return __current_; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __current() const _NOEXCEPT { return __current_; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __begin() const _NOEXCEPT { return __current_; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __end() const _NOEXCEPT { return __current_; }
private:
_Iterator __current_; // current iterator
@@ -92,10 +92,10 @@ struct __static_bounded_iter {
//
// Such an iterator points past the end of an empty range, so it is not dereferenceable.
// Operations like comparison and assignment are valid.
- _LIBCPP_HIDE_FROM_ABI __static_bounded_iter() = default;
+ __static_bounded_iter() = default;
- _LIBCPP_HIDE_FROM_ABI __static_bounded_iter(__static_bounded_iter const&) = default;
- _LIBCPP_HIDE_FROM_ABI __static_bounded_iter(__static_bounded_iter&&) = default;
+ __static_bounded_iter(__static_bounded_iter const&) = default;
+ __static_bounded_iter(__static_bounded_iter&&) = default;
template <class _OtherIterator,
__enable_if_t<
@@ -103,18 +103,17 @@ struct __static_bounded_iter {
_Or<is_same<reference, __iterator_reference<_OtherIterator> >,
is_same<reference, __make_const_lvalue_ref<__iterator_reference<_OtherIterator> > > > >::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
- __static_bounded_iter(__static_bounded_iter<_OtherIterator, _Size> const& __other) _NOEXCEPT
+ _LIBCPP_CONSTEXPR __static_bounded_iter(__static_bounded_iter<_OtherIterator, _Size> const& __other) _NOEXCEPT
: __storage_(__other.__storage_.__current(), __other.__storage_.__begin()) {}
// Assign a bounded iterator to another one, rebinding the bounds of the iterator as well.
- _LIBCPP_HIDE_FROM_ABI __static_bounded_iter& operator=(__static_bounded_iter const&) = default;
- _LIBCPP_HIDE_FROM_ABI __static_bounded_iter& operator=(__static_bounded_iter&&) = default;
+ __static_bounded_iter& operator=(__static_bounded_iter const&) = default;
+ __static_bounded_iter& operator=(__static_bounded_iter&&) = default;
private:
// Create an iterator wrapping the given iterator, and whose bounds are described
// by the provided [begin, begin + _Size] range.
- _LIBCPP_HIDE_FROM_ABI
+
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __static_bounded_iter(_Iterator __current, _Iterator __begin)
: __storage_(__current, __begin) {
_LIBCPP_ASSERT_INTERNAL(
@@ -128,20 +127,19 @@ struct __static_bounded_iter {
public:
// Dereference and indexing operations.
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current() != __end(), "__static_bounded_iter::operator*: Attempt to dereference an iterator at the end");
return *__current();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current() != __end(), "__static_bounded_iter::operator->: Attempt to dereference an iterator at the end");
return std::__to_address(__current());
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference
- operator[](difference_type __n) const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator[](difference_type __n) const _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__n >= __begin() - __current(),
"__static_bounded_iter::operator[]: Attempt to index an iterator past the start");
@@ -154,31 +152,31 @@ struct __static_bounded_iter {
// Arithmetic operations.
//
// These operations check that the iterator remains within `[begin, end]`.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter& operator++() _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter& operator++() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current() != __end(), "__static_bounded_iter::operator++: Attempt to advance an iterator past the end");
++__current();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter operator++(int) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter operator++(int) _NOEXCEPT {
__static_bounded_iter __tmp(*this);
++*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter& operator--() _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter& operator--() _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__current() != __begin(), "__static_bounded_iter::operator--: Attempt to rewind an iterator past the start");
--__current();
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter operator--(int) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter operator--(int) _NOEXCEPT {
__static_bounded_iter __tmp(*this);
--*this;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter& operator+=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter& operator+=(difference_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__n >= __begin() - __current(),
"__static_bounded_iter::operator+=: Attempt to rewind an iterator past the start");
@@ -187,20 +185,20 @@ struct __static_bounded_iter {
__current() += __n;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __static_bounded_iter
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __static_bounded_iter
operator+(__static_bounded_iter const& __self, difference_type __n) _NOEXCEPT {
__static_bounded_iter __tmp(__self);
__tmp += __n;
return __tmp;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __static_bounded_iter
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __static_bounded_iter
operator+(difference_type __n, __static_bounded_iter const& __self) _NOEXCEPT {
__static_bounded_iter __tmp(__self);
__tmp += __n;
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter& operator-=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __static_bounded_iter& operator-=(difference_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__n <= __current() - __begin(),
"__static_bounded_iter::operator-=: Attempt to rewind an iterator past the start");
@@ -209,13 +207,13 @@ struct __static_bounded_iter {
__current() -= __n;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __static_bounded_iter
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 friend __static_bounded_iter
operator-(__static_bounded_iter const& __self, difference_type __n) _NOEXCEPT {
__static_bounded_iter __tmp(__self);
__tmp -= __n;
return __tmp;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 friend difference_type
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 friend difference_type
operator-(__static_bounded_iter const& __x, __static_bounded_iter const& __y) _NOEXCEPT {
return __x.__current() - __y.__current();
}
@@ -226,36 +224,36 @@ struct __static_bounded_iter {
// The valid range for each iterator is also not considered as part of the comparison,
// i.e. two iterators pointing to the same location will be considered equal even
// if they have different validity ranges.
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+ _LIBCPP_CONSTEXPR friend bool
operator==(__static_bounded_iter const& __x, __static_bounded_iter const& __y) _NOEXCEPT {
return __x.__current() == __y.__current();
}
#if _LIBCPP_STD_VER <= 17
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+ _LIBCPP_CONSTEXPR friend bool
operator!=(__static_bounded_iter const& __x, __static_bounded_iter const& __y) _NOEXCEPT {
return __x.__current() != __y.__current();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+ _LIBCPP_CONSTEXPR friend bool
operator<(__static_bounded_iter const& __x, __static_bounded_iter const& __y) _NOEXCEPT {
return __x.__current() < __y.__current();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+ _LIBCPP_CONSTEXPR friend bool
operator>(__static_bounded_iter const& __x, __static_bounded_iter const& __y) _NOEXCEPT {
return __x.__current() > __y.__current();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+ _LIBCPP_CONSTEXPR friend bool
operator<=(__static_bounded_iter const& __x, __static_bounded_iter const& __y) _NOEXCEPT {
return __x.__current() <= __y.__current();
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+ _LIBCPP_CONSTEXPR friend bool
operator>=(__static_bounded_iter const& __x, __static_bounded_iter const& __y) _NOEXCEPT {
return __x.__current() >= __y.__current();
}
#else
- _LIBCPP_HIDE_FROM_ABI constexpr friend strong_ordering
+ constexpr friend strong_ordering
operator<=>(__static_bounded_iter const& __x, __static_bounded_iter const& __y) noexcept {
if constexpr (three_way_comparable<_Iterator, strong_ordering>) {
return __x.__current() <=> __y.__current();
@@ -278,21 +276,14 @@ struct __static_bounded_iter {
friend struct __static_bounded_iter;
__static_bounded_iter_storage<_Iterator, _Size> __storage_;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator& __current() _NOEXCEPT {
- return __storage_.__current();
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __current() const _NOEXCEPT {
- return __storage_.__current();
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __begin() const _NOEXCEPT {
- return __storage_.__begin();
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __end() const _NOEXCEPT { return __storage_.__end(); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator& __current() _NOEXCEPT { return __storage_.__current(); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __current() const _NOEXCEPT { return __storage_.__current(); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __begin() const _NOEXCEPT { return __storage_.__begin(); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iterator __end() const _NOEXCEPT { return __storage_.__end(); }
};
template <size_t _Size, class _It>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __static_bounded_iter<_It, _Size>
-__make_static_bounded_iter(_It __it, _It __begin) {
+_LIBCPP_CONSTEXPR __static_bounded_iter<_It, _Size> __make_static_bounded_iter(_It __it, _It __begin) {
return __static_bounded_iter<_It, _Size>(std::move(__it), std::move(__begin));
}
@@ -307,7 +298,7 @@ struct pointer_traits<__static_bounded_iter<_Iterator, _Size> > {
using element_type = typename pointer_traits<_Iterator>::element_type;
using difference_type = typename pointer_traits<_Iterator>::difference_type;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static element_type* to_address(pointer __it) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR static element_type* to_address(pointer __it) _NOEXCEPT {
return std::__to_address(__it.__current());
}
};
diff --git a/libcxx/include/__iterator/unreachable_sentinel.h b/libcxx/include/__iterator/unreachable_sentinel.h
index 77e663da4b3a6a..9cc61450e3b230 100644
--- a/libcxx/include/__iterator/unreachable_sentinel.h
+++ b/libcxx/include/__iterator/unreachable_sentinel.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct unreachable_sentinel_t {
template <weakly_incrementable _Iter>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(unreachable_sentinel_t, const _Iter&) noexcept {
+ friend constexpr bool operator==(unreachable_sentinel_t, const _Iter&) noexcept {
return false;
}
};
diff --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h
index 89ddb9658c6971..e5239c77be4e3e 100644
--- a/libcxx/include/__iterator/wrap_iter.h
+++ b/libcxx/include/__iterator/wrap_iter.h
@@ -46,65 +46,57 @@ class _LIBCPP_WARN_UNUSED __wrap_iter {
_Iter __i_;
public:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter() _NOEXCEPT : __i_() {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter() _NOEXCEPT : __i_() {}
template <class _OtherIter,
__enable_if_t<
_And<is_convertible<const _OtherIter&, _Iter>,
_Or<is_same<reference, __iterator_reference<_OtherIter> >,
is_same<reference, __make_const_lvalue_ref<__iterator_reference<_OtherIter> > > > >::value,
int> = 0>
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter(const __wrap_iter<_OtherIter>& __u) _NOEXCEPT
- : __i_(__u.__i_) {}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT {
- return *__i_;
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT {
- return std::__to_address(__i_);
- }
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator++() _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter(const __wrap_iter<_OtherIter>& __u) _NOEXCEPT : __i_(__u.__i_) {}
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator*() const _NOEXCEPT { return *__i_; }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 pointer operator->() const _NOEXCEPT { return std::__to_address(__i_); }
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator++() _NOEXCEPT {
++__i_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator++(int) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator++(int) _NOEXCEPT {
__wrap_iter __tmp(*this);
++(*this);
return __tmp;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator--() _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator--() _NOEXCEPT {
--__i_;
return *this;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator--(int) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator--(int) _NOEXCEPT {
__wrap_iter __tmp(*this);
--(*this);
return __tmp;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter
- operator+(difference_type __n) const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator+(difference_type __n) const _NOEXCEPT {
__wrap_iter __w(*this);
__w += __n;
return __w;
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator+=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator+=(difference_type __n) _NOEXCEPT {
__i_ += __n;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter
- operator-(difference_type __n) const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter operator-(difference_type __n) const _NOEXCEPT {
return *this + (-__n);
}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator-=(difference_type __n) _NOEXCEPT {
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter& operator-=(difference_type __n) _NOEXCEPT {
*this += -__n;
return *this;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 reference
- operator[](difference_type __n) const _NOEXCEPT {
+ [[__nodiscard__]] _LIBCPP_CONSTEXPR_SINCE_CXX14 reference operator[](difference_type __n) const _NOEXCEPT {
return __i_[__n];
}
private:
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __wrap_iter(_Iter __x) _NOEXCEPT : __i_(__x) {}
+ _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __wrap_iter(_Iter __x) _NOEXCEPT : __i_(__x) {}
template <class _Up>
friend class __wrap_iter;
@@ -120,84 +112,70 @@ class _LIBCPP_WARN_UNUSED __wrap_iter {
friend struct array;
#if _LIBCPP_STD_VER <= 17
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator==(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator==(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
return __x.__i_ == __y.__i_;
}
template <class _Iter2>
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator==(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator==(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return __x.__i_ == __y.__i_;
}
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator<(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator<(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
return __x.__i_ < __y.__i_;
}
template <class _Iter2>
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator<(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator<(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return __x.__i_ < __y.__i_;
}
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator!=(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator!=(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
return !(__x == __y);
}
template <class _Iter2>
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator!=(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator!=(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return !(__x == __y);
}
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator>(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator>(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
return __y < __x;
}
template <class _Iter2>
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator>(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator>(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return __y < __x;
}
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator>=(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator>=(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
return !(__x < __y);
}
template <class _Iter2>
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator>=(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator>=(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return !(__x < __y);
}
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator<=(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator<=(const __wrap_iter& __x, const __wrap_iter& __y) _NOEXCEPT {
return !(__y < __x);
}
template <class _Iter2>
- _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool
- operator<=(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
+ friend _LIBCPP_CONSTEXPR bool operator<=(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT {
return !(__y < __x);
}
#else
- _LIBCPP_HIDE_FROM_ABI friend bool operator==(const __wrap_iter&, const __wrap_iter&) = default;
+ friend bool operator==(const __wrap_iter&, const __wrap_iter&) = default;
template <class _Iter2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr bool
- operator==(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) noexcept {
+ friend constexpr bool operator==(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) noexcept {
return __x.__i_ == __y.__i_;
}
template <class _Iter2>
- _LIBCPP_HIDE_FROM_ABI friend constexpr strong_ordering
- operator<=>(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) noexcept {
+ friend constexpr strong_ordering operator<=>(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) noexcept {
if constexpr (three_way_comparable_with<_Iter, _Iter2, strong_ordering>) {
return __x.__i_ <=> __y.__i_;
} else {
@@ -214,18 +192,18 @@ class _LIBCPP_WARN_UNUSED __wrap_iter {
#ifndef _LIBCPP_CXX03_LANG
template <class _Iter2>
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR_SINCE_CXX14 auto
+ [[__nodiscard__]] friend _LIBCPP_CONSTEXPR_SINCE_CXX14 auto
operator-(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT->decltype(__x.__i_ - __y.__i_)
#else
template <class _Iter2>
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR_SINCE_CXX14
+ [[__nodiscard__]] friend _LIBCPP_CONSTEXPR_SINCE_CXX14
typename __wrap_iter::difference_type operator-(const __wrap_iter& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
#endif // C++03
{
return __x.__i_ - __y.__i_;
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter
+ [[__nodiscard__]] friend _LIBCPP_CONSTEXPR_SINCE_CXX14 __wrap_iter
operator+(typename __wrap_iter::difference_type __n, __wrap_iter __x) _NOEXCEPT {
__x += __n;
return __x;
More information about the libcxx-commits
mailing list