[libcxx-commits] [libcxx] [libc++][RFC] Refactor attributes to [[attribute_macro]] (PR #130099)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 6 05:11:59 PST 2025
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/130099
This is mostly a different way to add attributes everywhere, but I think it makes the code quite a bit easier to read for a few reasons:
- The square bracket syntax makes it more obvious what parts of the declaration are attributes, even if you don't know what all the attributes do.
- At least in my editor, the brackets are syntax-highlighted, so it's easier for me to find the end of the list, since I don't have to read all the attribute stuff to find the interesting parts (or vice versa, if I want to look for a particular attibutes, it's nicely highlighted where to find them)
- The names are less obnoxious to read, since we don't need to capitalize everything to distinguish between normal code and macros. (At least I think it's OK to use \_\_snake\_case for the attributes here)
>From 1e081ebe987ce5e1bb0c72143e9157fa09c4ee2a Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Thu, 6 Mar 2025 14:04:31 +0100
Subject: [PATCH] [libc++][RFC] Refactor attributes to [[attribute_macro]]
---
libcxx/.clang-format | 7 --
libcxx/docs/DesignDocs/VisibilityMacros.rst | 4 +-
libcxx/include/__algorithm/shuffle.h | 4 +-
libcxx/include/__atomic/atomic.h | 4 +-
libcxx/include/__chrono/duration.h | 10 +--
libcxx/include/__chrono/formatter.h | 45 +++++------
.../include/__chrono/parser_std_format_spec.h | 2 +-
libcxx/include/__chrono/time_point.h | 4 +-
.../__compare/common_comparison_category.h | 2 +-
libcxx/include/__compare/compare_three_way.h | 2 +-
.../__compare/compare_three_way_result.h | 2 +-
libcxx/include/__config | 52 ++++++-------
libcxx/include/__coroutine/coroutine_handle.h | 6 +-
.../__coroutine/noop_coroutine_handle.h | 2 +-
libcxx/include/__exception/operations.h | 2 +-
libcxx/include/__filesystem/u8path.h | 6 +-
libcxx/include/__format/buffer.h | 22 +++---
libcxx/include/__format/container_adaptor.h | 8 +-
libcxx/include/__format/format_arg.h | 11 ++-
libcxx/include/__format/format_arg_store.h | 2 +-
libcxx/include/__format/format_args.h | 2 +-
libcxx/include/__format/format_context.h | 13 +---
libcxx/include/__format/format_functions.h | 10 +--
.../include/__format/format_parse_context.h | 2 +-
libcxx/include/__format/format_string.h | 2 +-
libcxx/include/__format/format_to_n_result.h | 2 +-
libcxx/include/__format/formatter.h | 2 +-
libcxx/include/__format/formatter_bool.h | 2 +-
libcxx/include/__format/formatter_char.h | 8 +-
.../__format/formatter_floating_point.h | 10 +--
libcxx/include/__format/formatter_integer.h | 26 +++----
libcxx/include/__format/formatter_integral.h | 6 +-
libcxx/include/__format/formatter_pointer.h | 8 +-
libcxx/include/__format/formatter_string.h | 12 +--
libcxx/include/__format/formatter_tuple.h | 6 +-
.../include/__format/parser_std_format_spec.h | 2 +-
.../__format/range_default_formatter.h | 14 ++--
libcxx/include/__format/range_formatter.h | 2 +-
libcxx/include/__functional/binary_function.h | 8 +-
libcxx/include/__functional/binary_negate.h | 4 +-
libcxx/include/__functional/binder1st.h | 6 +-
libcxx/include/__functional/binder2nd.h | 6 +-
.../__functional/boyer_moore_searcher.h | 4 +-
.../include/__functional/default_searcher.h | 2 +-
libcxx/include/__functional/function.h | 6 +-
libcxx/include/__functional/hash.h | 52 ++++++-------
libcxx/include/__functional/mem_fun_ref.h | 40 +++++-----
libcxx/include/__functional/operations.h | 76 +++++++++----------
.../__functional/pointer_to_binary_function.h | 6 +-
.../__functional/pointer_to_unary_function.h | 6 +-
.../include/__functional/reference_wrapper.h | 2 +-
libcxx/include/__functional/unary_function.h | 6 +-
libcxx/include/__functional/unary_negate.h | 6 +-
.../include/__functional/weak_result_type.h | 22 +++---
libcxx/include/__fwd/array.h | 2 +-
libcxx/include/__fwd/complex.h | 2 +-
libcxx/include/__fwd/deque.h | 2 +-
libcxx/include/__fwd/format.h | 6 +-
libcxx/include/__fwd/fstream.h | 8 +-
libcxx/include/__fwd/functional.h | 4 +-
libcxx/include/__fwd/ios.h | 2 +-
libcxx/include/__fwd/istream.h | 4 +-
libcxx/include/__fwd/memory.h | 4 +-
libcxx/include/__fwd/memory_resource.h | 2 +-
libcxx/include/__fwd/ostream.h | 2 +-
libcxx/include/__fwd/pair.h | 2 +-
libcxx/include/__fwd/queue.h | 4 +-
libcxx/include/__fwd/sstream.h | 8 +-
libcxx/include/__fwd/stack.h | 2 +-
libcxx/include/__fwd/streambuf.h | 2 +-
libcxx/include/__fwd/string.h | 4 +-
libcxx/include/__fwd/string_view.h | 2 +-
libcxx/include/__fwd/subrange.h | 2 +-
libcxx/include/__fwd/tuple.h | 6 +-
libcxx/include/__fwd/variant.h | 6 +-
libcxx/include/__fwd/vector.h | 2 +-
libcxx/include/__hash_table | 44 +++++------
libcxx/include/__ios/fpos.h | 2 +-
.../include/__iterator/back_insert_iterator.h | 2 +-
.../__iterator/front_insert_iterator.h | 2 +-
libcxx/include/__iterator/insert_iterator.h | 2 +-
libcxx/include/__iterator/istream_iterator.h | 2 +-
.../include/__iterator/istreambuf_iterator.h | 2 +-
libcxx/include/__iterator/iterator.h | 2 +-
libcxx/include/__iterator/iterator_traits.h | 18 ++---
libcxx/include/__iterator/move_iterator.h | 4 +-
libcxx/include/__iterator/move_sentinel.h | 2 +-
libcxx/include/__iterator/ostream_iterator.h | 2 +-
.../include/__iterator/ostreambuf_iterator.h | 2 +-
libcxx/include/__iterator/reverse_iterator.h | 2 +-
libcxx/include/__iterator/wrap_iter.h | 6 +-
libcxx/include/__locale | 24 +++---
libcxx/include/__memory/allocator.h | 38 +++++-----
libcxx/include/__memory/allocator_arg_t.h | 2 +-
libcxx/include/__memory/allocator_traits.h | 2 +-
libcxx/include/__memory/auto_ptr.h | 6 +-
libcxx/include/__memory/inout_ptr.h | 2 +-
libcxx/include/__memory/out_ptr.h | 2 +-
libcxx/include/__memory/pointer_traits.h | 4 +-
.../include/__memory/raw_storage_iterator.h | 2 +-
libcxx/include/__memory/shared_ptr.h | 37 ++++-----
libcxx/include/__memory/temporary_buffer.h | 4 +-
libcxx/include/__memory/unique_ptr.h | 19 ++---
libcxx/include/__memory/uses_allocator.h | 2 +-
.../__memory_resource/polymorphic_allocator.h | 2 +-
libcxx/include/__mutex/lock_guard.h | 2 +-
libcxx/include/__mutex/once_flag.h | 4 +-
libcxx/include/__mutex/unique_lock.h | 2 +-
libcxx/include/__node_handle | 4 +-
libcxx/include/__ostream/basic_ostream.h | 6 +-
.../include/__random/bernoulli_distribution.h | 4 +-
.../include/__random/binomial_distribution.h | 4 +-
libcxx/include/__random/cauchy_distribution.h | 4 +-
.../__random/chi_squared_distribution.h | 4 +-
.../include/__random/discard_block_engine.h | 2 +-
.../include/__random/discrete_distribution.h | 4 +-
.../__random/exponential_distribution.h | 4 +-
.../__random/extreme_value_distribution.h | 4 +-
.../include/__random/fisher_f_distribution.h | 4 +-
libcxx/include/__random/gamma_distribution.h | 4 +-
.../include/__random/geometric_distribution.h | 4 +-
.../__random/independent_bits_engine.h | 2 +-
.../__random/linear_congruential_engine.h | 4 +-
.../include/__random/lognormal_distribution.h | 4 +-
.../__random/mersenne_twister_engine.h | 4 +-
.../__random/negative_binomial_distribution.h | 4 +-
libcxx/include/__random/normal_distribution.h | 4 +-
.../piecewise_constant_distribution.h | 4 +-
.../__random/piecewise_linear_distribution.h | 4 +-
.../include/__random/poisson_distribution.h | 4 +-
libcxx/include/__random/seed_seq.h | 2 +-
.../include/__random/shuffle_order_engine.h | 2 +-
.../include/__random/student_t_distribution.h | 4 +-
.../__random/subtract_with_carry_engine.h | 4 +-
.../__random/uniform_real_distribution.h | 4 +-
.../include/__random/weibull_distribution.h | 4 +-
.../include/__ranges/non_propagating_cache.h | 2 +-
libcxx/include/__ranges/subrange.h | 2 +-
libcxx/include/__string/char_traits.h | 10 +--
libcxx/include/__system_error/errc.h | 8 +-
libcxx/include/__system_error/error_code.h | 4 +-
.../include/__system_error/error_condition.h | 8 +-
libcxx/include/__thread/formatter.h | 2 +-
libcxx/include/__thread/id.h | 4 +-
libcxx/include/__thread/thread.h | 2 +-
libcxx/include/__tree | 46 +++++------
libcxx/include/__tuple/sfinae_helpers.h | 2 +-
libcxx/include/__tuple/tuple_element.h | 10 +--
libcxx/include/__tuple/tuple_size.h | 29 +++----
libcxx/include/__type_traits/add_cv_quals.h | 6 +-
.../include/__type_traits/aligned_storage.h | 4 +-
libcxx/include/__type_traits/aligned_union.h | 4 +-
libcxx/include/__type_traits/alignment_of.h | 2 +-
libcxx/include/__type_traits/common_type.h | 10 +--
libcxx/include/__type_traits/conditional.h | 4 +-
libcxx/include/__type_traits/decay.h | 2 +-
libcxx/include/__type_traits/dependent_type.h | 2 +-
libcxx/include/__type_traits/enable_if.h | 4 +-
libcxx/include/__type_traits/extent.h | 14 ++--
.../has_unique_object_representation.h | 2 +-
.../__type_traits/has_virtual_destructor.h | 2 +-
.../include/__type_traits/integral_constant.h | 2 +-
libcxx/include/__type_traits/invoke.h | 11 +--
libcxx/include/__type_traits/is_abstract.h | 2 +-
libcxx/include/__type_traits/is_aggregate.h | 2 +-
libcxx/include/__type_traits/is_arithmetic.h | 2 +-
libcxx/include/__type_traits/is_array.h | 8 +-
libcxx/include/__type_traits/is_assignable.h | 6 +-
libcxx/include/__type_traits/is_base_of.h | 4 +-
.../include/__type_traits/is_bounded_array.h | 4 +-
libcxx/include/__type_traits/is_class.h | 3 +-
libcxx/include/__type_traits/is_compound.h | 4 +-
libcxx/include/__type_traits/is_const.h | 6 +-
.../include/__type_traits/is_constructible.h | 8 +-
libcxx/include/__type_traits/is_convertible.h | 2 +-
.../include/__type_traits/is_destructible.h | 2 +-
libcxx/include/__type_traits/is_empty.h | 3 +-
libcxx/include/__type_traits/is_enum.h | 4 +-
libcxx/include/__type_traits/is_final.h | 5 +-
.../include/__type_traits/is_floating_point.h | 2 +-
libcxx/include/__type_traits/is_function.h | 3 +-
libcxx/include/__type_traits/is_fundamental.h | 4 +-
.../__type_traits/is_implicit_lifetime.h | 2 +-
libcxx/include/__type_traits/is_integral.h | 5 +-
.../include/__type_traits/is_literal_type.h | 5 +-
.../include/__type_traits/is_member_pointer.h | 7 +-
.../__type_traits/is_nothrow_assignable.h | 6 +-
.../__type_traits/is_nothrow_constructible.h | 8 +-
.../__type_traits/is_nothrow_destructible.h | 12 +--
.../include/__type_traits/is_null_pointer.h | 2 +-
libcxx/include/__type_traits/is_object.h | 2 +-
libcxx/include/__type_traits/is_pod.h | 2 +-
libcxx/include/__type_traits/is_pointer.h | 4 +-
libcxx/include/__type_traits/is_polymorphic.h | 2 +-
libcxx/include/__type_traits/is_reference.h | 18 ++---
libcxx/include/__type_traits/is_same.h | 2 +-
libcxx/include/__type_traits/is_scalar.h | 6 +-
libcxx/include/__type_traits/is_signed.h | 4 +-
.../__type_traits/is_standard_layout.h | 2 +-
libcxx/include/__type_traits/is_swappable.h | 8 +-
libcxx/include/__type_traits/is_trivial.h | 4 +-
.../__type_traits/is_trivially_assignable.h | 4 +-
.../is_trivially_constructible.h | 8 +-
.../__type_traits/is_trivially_copyable.h | 2 +-
.../__type_traits/is_trivially_destructible.h | 4 +-
.../__type_traits/is_unbounded_array.h | 4 +-
libcxx/include/__type_traits/is_union.h | 3 +-
libcxx/include/__type_traits/is_unsigned.h | 4 +-
libcxx/include/__type_traits/is_void.h | 3 +-
libcxx/include/__type_traits/is_volatile.h | 6 +-
libcxx/include/__type_traits/rank.h | 6 +-
.../__type_traits/remove_all_extents.h | 6 +-
libcxx/include/__type_traits/remove_const.h | 4 +-
libcxx/include/__type_traits/remove_extent.h | 6 +-
libcxx/include/__type_traits/remove_pointer.h | 10 +--
.../include/__type_traits/remove_volatile.h | 4 +-
libcxx/include/__type_traits/result_of.h | 6 +-
libcxx/include/__utility/in_place.h | 4 +-
libcxx/include/__utility/integer_sequence.h | 2 +-
libcxx/include/__utility/pair.h | 10 +--
.../include/__utility/piecewise_construct.h | 2 +-
libcxx/include/__utility/rel_ops.h | 8 +-
libcxx/include/__variant/monostate.h | 8 +-
libcxx/include/__vector/vector.h | 2 +-
libcxx/include/__vector/vector_bool.h | 6 +-
.../include/__vector/vector_bool_formatter.h | 2 +-
libcxx/include/any | 10 +--
libcxx/include/array | 8 +-
libcxx/include/bitset | 6 +-
libcxx/include/ccomplex | 6 +-
libcxx/include/ciso646 | 4 +-
libcxx/include/codecvt | 11 +--
libcxx/include/complex | 14 ++--
libcxx/include/cstdalign | 6 +-
libcxx/include/cstdbool | 8 +-
libcxx/include/ctgmath | 5 +-
libcxx/include/deque | 8 +-
libcxx/include/experimental/type_traits | 8 +-
libcxx/include/experimental/utility | 2 +-
libcxx/include/ext/__hash | 24 +++---
libcxx/include/ext/hash_map | 26 +++----
libcxx/include/ext/hash_set | 4 +-
libcxx/include/forward_list | 14 ++--
libcxx/include/fstream | 8 +-
libcxx/include/future | 34 ++++-----
libcxx/include/initializer_list | 2 +-
libcxx/include/ios | 6 +-
libcxx/include/iosfwd | 6 +-
libcxx/include/istream | 8 +-
libcxx/include/limits | 76 ++++++++++---------
libcxx/include/list | 10 +--
libcxx/include/locale | 32 ++++----
libcxx/include/map | 32 ++++----
libcxx/include/mutex | 8 +-
libcxx/include/optional | 6 +-
libcxx/include/queue | 10 +--
libcxx/include/ratio | 22 +++---
libcxx/include/regex | 22 +++---
libcxx/include/scoped_allocator | 2 +-
libcxx/include/set | 12 +--
libcxx/include/span | 4 +-
libcxx/include/sstream | 8 +-
libcxx/include/stack | 6 +-
libcxx/include/streambuf | 2 +-
libcxx/include/string | 20 ++---
libcxx/include/strstream | 8 +-
libcxx/include/syncstream | 4 +-
libcxx/include/tuple | 6 +-
libcxx/include/typeindex | 6 +-
libcxx/include/unordered_map | 34 ++++-----
libcxx/include/unordered_set | 12 +--
libcxx/include/valarray | 36 ++++-----
libcxx/include/variant | 70 ++++++++---------
libcxx/src/locale.cpp | 4 +-
274 files changed, 1099 insertions(+), 1088 deletions(-)
diff --git a/libcxx/.clang-format b/libcxx/.clang-format
index f548119652c19..41a9af50ae1d9 100644
--- a/libcxx/.clang-format
+++ b/libcxx/.clang-format
@@ -24,12 +24,6 @@ AttributeMacros: [
'_LIBCPP_CONSTEXPR_SINCE_CXX23',
'_LIBCPP_CONSTEXPR',
'_LIBCPP_CONSTINIT',
- '_LIBCPP_DEPRECATED_IN_CXX11',
- '_LIBCPP_DEPRECATED_IN_CXX14',
- '_LIBCPP_DEPRECATED_IN_CXX17',
- '_LIBCPP_DEPRECATED_IN_CXX20',
- '_LIBCPP_DEPRECATED_IN_CXX23',
- '_LIBCPP_DEPRECATED',
'_LIBCPP_DISABLE_EXTENSION_WARNING',
'_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION',
'_LIBCPP_EXPORTED_FROM_ABI',
@@ -45,7 +39,6 @@ AttributeMacros: [
'_LIBCPP_OVERRIDABLE_FUNC_VIS',
'_LIBCPP_STANDALONE_DEBUG',
'_LIBCPP_TEMPLATE_DATA_VIS',
- '_LIBCPP_TEMPLATE_VIS',
'_LIBCPP_THREAD_SAFETY_ANNOTATION',
'_LIBCPP_USING_IF_EXISTS',
'_LIBCPP_WEAK',
diff --git a/libcxx/docs/DesignDocs/VisibilityMacros.rst b/libcxx/docs/DesignDocs/VisibilityMacros.rst
index 83a9a62942bc9..07b1de0d5b7b3 100644
--- a/libcxx/docs/DesignDocs/VisibilityMacros.rst
+++ b/libcxx/docs/DesignDocs/VisibilityMacros.rst
@@ -64,7 +64,7 @@ Visibility Macros
ABI, we should create a new _LIBCPP_HIDE_FROM_ABI_AFTER_XXX macro, and we can
use it to start removing symbols from the ABI after that stable version.
-**_LIBCPP_TEMPLATE_VIS**
+**__libcpp_template_vis**
Mark a type's typeinfo and vtable as having default visibility.
This macro has no effect on the visibility of the type's member functions.
@@ -80,7 +80,7 @@ Visibility Macros
an extern template declaration as being exported by the libc++ library.
This attribute must be specified on all extern class template declarations.
- This macro is used to override the `_LIBCPP_TEMPLATE_VIS` attribute
+ This macro is used to override the `__libcpp_template_vis` attribute
specified on the primary template and to export the member functions produced
by the explicit instantiation in the dylib.
diff --git a/libcxx/include/__algorithm/shuffle.h b/libcxx/include/__algorithm/shuffle.h
index 7177fbb469ba7..db1eba7810c66 100644
--- a/libcxx/include/__algorithm/shuffle.h
+++ b/libcxx/include/__algorithm/shuffle.h
@@ -92,7 +92,7 @@ class _LIBCPP_EXPORTED_FROM_ABI __rs_default {
_LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();
template <class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
+_LIBCPP_HIDE_FROM_ABI [[__libcpp_deprecated_in_cxx14("std::shuffle should be used instead")]] void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
typedef uniform_int_distribution<ptrdiff_t> _Dp;
@@ -110,7 +110,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) {
}
template <class _RandomAccessIterator, class _RandomNumberGenerator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
+_LIBCPP_HIDE_FROM_ABI [[__libcpp_deprecated_in_cxx14("std::shuffle should be used instead")]] void
random_shuffle(_RandomAccessIterator __first,
_RandomAccessIterator __last,
# ifndef _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__atomic/atomic.h b/libcxx/include/__atomic/atomic.h
index c65f9afe4f390..8fbd146f650f1 100644
--- a/libcxx/include/__atomic/atomic.h
+++ b/libcxx/include/__atomic/atomic.h
@@ -467,13 +467,13 @@ _LIBCPP_HIDE_FROM_ABI bool atomic_is_lock_free(const atomic<_Tp>* __o) _NOEXCEPT
// atomic_init
template <class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void
+[[__libcpp_deprecated_in_cxx20()]] _LIBCPP_HIDE_FROM_ABI void
atomic_init(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT {
std::__cxx_atomic_init(std::addressof(__o->__a_), __d);
}
template <class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void
+[[__libcpp_deprecated_in_cxx20()]] _LIBCPP_HIDE_FROM_ABI void
atomic_init(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT {
std::__cxx_atomic_init(std::addressof(__o->__a_), __d);
}
diff --git a/libcxx/include/__chrono/duration.h b/libcxx/include/__chrono/duration.h
index 941aca6009599..774de3a8eb349 100644
--- a/libcxx/include/__chrono/duration.h
+++ b/libcxx/include/__chrono/duration.h
@@ -32,7 +32,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace chrono {
template <class _Rep, class _Period = ratio<1> >
-class _LIBCPP_TEMPLATE_VIS duration;
+class [[__libcpp_template_vis]] duration;
template <class _Tp>
inline const bool __is_duration_v = false;
@@ -52,7 +52,7 @@ inline const bool __is_duration_v<const volatile duration<_Rep, _Period> > = tru
} // namespace chrono
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-struct _LIBCPP_TEMPLATE_VIS common_type<chrono::duration<_Rep1, _Period1>, chrono::duration<_Rep2, _Period2> > {
+struct [[__libcpp_template_vis]] common_type<chrono::duration<_Rep1, _Period1>, chrono::duration<_Rep2, _Period2> > {
typedef chrono::duration<typename common_type<_Rep1, _Rep2>::type, __ratio_gcd<_Period1, _Period2> > type;
};
@@ -107,7 +107,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToDuration duration_cast(const d
}
template <class _Rep>
-struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {};
+struct [[__libcpp_template_vis]] treat_as_floating_point : is_floating_point<_Rep> {};
#if _LIBCPP_STD_VER >= 17
template <class _Rep>
@@ -115,7 +115,7 @@ inline constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>:
#endif
template <class _Rep>
-struct _LIBCPP_TEMPLATE_VIS duration_values {
+struct [[__libcpp_template_vis]] duration_values {
public:
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR _Rep zero() _NOEXCEPT { return _Rep(0); }
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR _Rep max() _NOEXCEPT { return numeric_limits<_Rep>::max(); }
@@ -156,7 +156,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToDuration round(const duration<
// duration
template <class _Rep, class _Period>
-class _LIBCPP_TEMPLATE_VIS duration {
+class [[__libcpp_template_vis]] duration {
static_assert(!__is_duration_v<_Rep>, "A duration representation can not be a duration");
static_assert(__is_ratio_v<_Period>, "Second template parameter of duration must be a std::ratio");
static_assert(_Period::num > 0, "duration period must be positive");
diff --git a/libcxx/include/__chrono/formatter.h b/libcxx/include/__chrono/formatter.h
index 7b081f92667b5..0d5b6390df2b9 100644
--- a/libcxx/include/__chrono/formatter.h
+++ b/libcxx/include/__chrono/formatter.h
@@ -698,7 +698,7 @@ __format_chrono(const _Tp& __value,
} // namespace __formatter
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS __formatter_chrono {
+struct [[__libcpp_template_vis]] __formatter_chrono {
public:
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator
@@ -716,7 +716,7 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_chrono {
};
template <class _Duration, __fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::sys_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::sys_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -730,7 +730,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::sys_time<_Duration>, _CharT> : pub
# if _LIBCPP_HAS_EXPERIMENTAL_TZDB
template <class _Duration, __fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::utc_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::utc_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -741,7 +741,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::utc_time<_Duration>, _CharT> : pub
};
template <class _Duration, __fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::tai_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::tai_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -752,7 +752,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::tai_time<_Duration>, _CharT> : pub
};
template <class _Duration, __fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::gps_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::gps_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -766,7 +766,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::gps_time<_Duration>, _CharT> : pub
# endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
template <class _Duration, __fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::file_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::file_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -777,7 +777,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::file_time<_Duration>, _CharT> : pu
};
template <class _Duration, __fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::local_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::local_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -811,7 +811,7 @@ struct formatter<chrono::duration<_Rep, _Period>, _CharT> : public __formatter_c
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::day, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::day, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -822,7 +822,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::day, _CharT> : public __formatter_
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::month, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -833,7 +833,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month, _CharT> : public __formatte
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::year, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -844,7 +844,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year, _CharT> : public __formatter
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::weekday, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -855,7 +855,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday, _CharT> : public __format
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday_indexed, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::weekday_indexed, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -866,7 +866,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday_indexed, _CharT> : public
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday_last, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::weekday_last, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -877,7 +877,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::weekday_last, _CharT> : public __f
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_day, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::month_day, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -888,7 +888,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_day, _CharT> : public __form
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_day_last, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::month_day_last, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -899,7 +899,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_day_last, _CharT> : public _
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_weekday, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::month_weekday, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -910,7 +910,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_weekday, _CharT> : public __
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_weekday_last, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::month_weekday_last, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -921,7 +921,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::month_weekday_last, _CharT> : publ
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::year_month, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -932,7 +932,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month, _CharT> : public __for
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_day, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::year_month_day, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -943,7 +943,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_day, _CharT> : public _
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_day_last, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::year_month_day_last, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -954,7 +954,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_day_last, _CharT> : pub
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_weekday, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]] formatter<chrono::year_month_weekday, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
@@ -965,7 +965,8 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_weekday, _CharT> : publ
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<chrono::year_month_weekday_last, _CharT> : public __formatter_chrono<_CharT> {
+struct [[__libcpp_template_vis]]
+formatter<chrono::year_month_weekday_last, _CharT> : public __formatter_chrono<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __formatter_chrono<_CharT>;
diff --git a/libcxx/include/__chrono/parser_std_format_spec.h b/libcxx/include/__chrono/parser_std_format_spec.h
index 4df8e603c6bcf..6b72cb78859e3 100644
--- a/libcxx/include/__chrono/parser_std_format_spec.h
+++ b/libcxx/include/__chrono/parser_std_format_spec.h
@@ -139,7 +139,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __validate_time_zone(__flags __flags) {
}
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS __parser_chrono {
+class [[__libcpp_template_vis]] __parser_chrono {
using _ConstIterator _LIBCPP_NODEBUG = typename basic_format_parse_context<_CharT>::const_iterator;
public:
diff --git a/libcxx/include/__chrono/time_point.h b/libcxx/include/__chrono/time_point.h
index 5e79fa5d257fa..8ca5240bedd9c 100644
--- a/libcxx/include/__chrono/time_point.h
+++ b/libcxx/include/__chrono/time_point.h
@@ -31,7 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace chrono {
template <class _Clock, class _Duration = typename _Clock::duration>
-class _LIBCPP_TEMPLATE_VIS time_point {
+class [[__libcpp_template_vis]] time_point {
static_assert(__is_duration_v<_Duration>, "Second template parameter of time_point must be a std::chrono::duration");
public:
@@ -76,7 +76,7 @@ class _LIBCPP_TEMPLATE_VIS time_point {
} // namespace chrono
template <class _Clock, class _Duration1, class _Duration2>
-struct _LIBCPP_TEMPLATE_VIS
+struct [[__libcpp_template_vis]]
common_type<chrono::time_point<_Clock, _Duration1>, chrono::time_point<_Clock, _Duration2> > {
typedef chrono::time_point<_Clock, typename common_type<_Duration1, _Duration2>::type> type;
};
diff --git a/libcxx/include/__compare/common_comparison_category.h b/libcxx/include/__compare/common_comparison_category.h
index 6ddf9b9d45894..30118fd3cf87f 100644
--- a/libcxx/include/__compare/common_comparison_category.h
+++ b/libcxx/include/__compare/common_comparison_category.h
@@ -72,7 +72,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr auto __get_comp_type() {
// [cmp.common], common comparison category type
template <class... _Ts>
-struct _LIBCPP_TEMPLATE_VIS common_comparison_category {
+struct [[__libcpp_template_vis]] common_comparison_category {
using type = decltype(__comp_detail::__get_comp_type<_Ts...>());
};
diff --git a/libcxx/include/__compare/compare_three_way.h b/libcxx/include/__compare/compare_three_way.h
index 01c12076c0d73..c2e6afc4309a3 100644
--- a/libcxx/include/__compare/compare_three_way.h
+++ b/libcxx/include/__compare/compare_three_way.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
-struct _LIBCPP_TEMPLATE_VIS compare_three_way {
+struct [[__libcpp_template_vis]] compare_three_way {
template <class _T1, class _T2>
requires three_way_comparable_with<_T1, _T2>
constexpr _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
diff --git a/libcxx/include/__compare/compare_three_way_result.h b/libcxx/include/__compare/compare_three_way_result.h
index 6ee2eff00302d..7d870bc647deb 100644
--- a/libcxx/include/__compare/compare_three_way_result.h
+++ b/libcxx/include/__compare/compare_three_way_result.h
@@ -33,7 +33,7 @@ struct _LIBCPP_HIDE_FROM_ABI __compare_three_way_result<
};
template <class _Tp, class _Up = _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS compare_three_way_result
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS compare_three_way_result
: __compare_three_way_result<_Tp, _Up, void> {};
template <class _Tp, class _Up = _Tp>
diff --git a/libcxx/include/__config b/libcxx/include/__config
index c8224b07a6b81..ff2f6398be8da 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -389,7 +389,7 @@ typedef __char32_t char32_t;
# define _LIBCPP_HIDDEN
# define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
-# define _LIBCPP_TEMPLATE_VIS
+# define __libcpp_template_vis
# define _LIBCPP_TEMPLATE_DATA_VIS
# define _LIBCPP_TYPE_VISIBILITY_DEFAULT
@@ -421,9 +421,9 @@ typedef __char32_t char32_t;
// GCC doesn't support the type_visibility attribute, so we have to keep the visibility attribute on templates
# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && !__has_attribute(__type_visibility__)
-# define _LIBCPP_TEMPLATE_VIS __attribute__((__visibility__("default")))
+# define __libcpp_template_vis __gnu__::__visibility__("default")
# else
-# define _LIBCPP_TEMPLATE_VIS
+# define __libcpp_template_vis
# endif
# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
@@ -692,66 +692,60 @@ typedef __char32_t char32_t;
# define _LIBCPP_HAS_CHAR8_T 1
# endif
+# define _LIBCPP_OPEN_PAREN (
+# define _LIBCPP_CLOSE_PAREN )
+# define _LIBCPP_OPTIONAL_PARENS(...) __VA_OPT__(_LIBCPP_OPEN_PAREN) __VA_ARGS__ __VA_OPT__(_LIBCPP_CLOSE_PAREN)
+
// Deprecation macros.
//
// Deprecations warnings are always enabled, except when users explicitly opt-out
// by defining _LIBCPP_DISABLE_DEPRECATION_WARNINGS.
# if !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
-# if __has_attribute(__deprecated__)
-# define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
-# define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
-# elif _LIBCPP_STD_VER >= 14
-# define _LIBCPP_DEPRECATED [[deprecated]]
-# define _LIBCPP_DEPRECATED_(m) [[deprecated(m)]]
-# else
-# define _LIBCPP_DEPRECATED
-# define _LIBCPP_DEPRECATED_(m)
-# endif
+# define __libcpp_deprecated(...) __deprecated__ _LIBCPP_OPTIONAL_PARENS(__VA_ARGS__)
# else
-# define _LIBCPP_DEPRECATED
-# define _LIBCPP_DEPRECATED_(m)
+# define __libcpp_deprecated(...)
# endif
# if !defined(_LIBCPP_CXX03_LANG)
-# define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
+# define __libcpp_deprecated_in_cxx11(...) __libcpp_deprecated(__VA_ARGS__)
# else
-# define _LIBCPP_DEPRECATED_IN_CXX11
+# define __libcpp_deprecated_in_cxx11(...)
# endif
# if _LIBCPP_STD_VER >= 14
-# define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED
+# define __libcpp_deprecated_in_cxx14(...) __libcpp_deprecated(__VA_ARGS__)
# else
-# define _LIBCPP_DEPRECATED_IN_CXX14
+# define __libcpp_deprecated_in_cxx14(...)
# endif
# if _LIBCPP_STD_VER >= 17
-# define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
+# define __libcpp_deprecated_in_cxx17(...) __libcpp_deprecated(__VA_ARGS__)
# else
-# define _LIBCPP_DEPRECATED_IN_CXX17
+# define __libcpp_deprecated_in_cxx17(...)
# endif
# if _LIBCPP_STD_VER >= 20
-# define _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_DEPRECATED
+# define __libcpp_deprecated_in_cxx20(...) __libcpp_deprecated(__VA_ARGS__)
# else
-# define _LIBCPP_DEPRECATED_IN_CXX20
+# define __libcpp_deprecated_in_cxx20(...)
# endif
# if _LIBCPP_STD_VER >= 23
-# define _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_DEPRECATED
+# define __libcpp_deprecated_in_cxx23(...) __libcpp_deprecated(__VA_ARGS__)
# else
-# define _LIBCPP_DEPRECATED_IN_CXX23
+# define __libcpp_deprecated_in_cxx23(...)
# endif
# if _LIBCPP_STD_VER >= 26
-# define _LIBCPP_DEPRECATED_IN_CXX26 _LIBCPP_DEPRECATED
+# define __libcpp_deprecated_in_cxx26(...) __libcpp_deprecated(__VA_ARGS__)
# else
-# define _LIBCPP_DEPRECATED_IN_CXX26
+# define __libcpp_deprecated_in_cxx26(...)
# endif
# if _LIBCPP_HAS_CHAR8_T
-# define _LIBCPP_DEPRECATED_WITH_CHAR8_T _LIBCPP_DEPRECATED
+# define __libcpp_deprecated_with_char8_t(...) __libcpp_deprecated(__VA_ARGS__)
# else
-# define _LIBCPP_DEPRECATED_WITH_CHAR8_T
+# define __libcpp_deprecated_with_char8_t(...)
# endif
// Macros to enter and leave a state where deprecation warnings are suppressed.
diff --git a/libcxx/include/__coroutine/coroutine_handle.h b/libcxx/include/__coroutine/coroutine_handle.h
index e2cde20498d84..3ce6c0f0a3c2a 100644
--- a/libcxx/include/__coroutine/coroutine_handle.h
+++ b/libcxx/include/__coroutine/coroutine_handle.h
@@ -28,10 +28,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// [coroutine.handle]
template <class _Promise = void>
-struct _LIBCPP_TEMPLATE_VIS coroutine_handle;
+struct [[__libcpp_template_vis]] coroutine_handle;
template <>
-struct _LIBCPP_TEMPLATE_VIS coroutine_handle<void> {
+struct [[__libcpp_template_vis]] coroutine_handle<void> {
public:
// [coroutine.handle.con], construct/reset
constexpr coroutine_handle() noexcept = default;
@@ -93,7 +93,7 @@ operator<=>(coroutine_handle<> __x, coroutine_handle<> __y) noexcept {
}
template <class _Promise>
-struct _LIBCPP_TEMPLATE_VIS coroutine_handle {
+struct [[__libcpp_template_vis]] coroutine_handle {
public:
// [coroutine.handle.con], construct/reset
constexpr coroutine_handle() noexcept = default;
diff --git a/libcxx/include/__coroutine/noop_coroutine_handle.h b/libcxx/include/__coroutine/noop_coroutine_handle.h
index da13d579604b5..46fb68fe2e41a 100644
--- a/libcxx/include/__coroutine/noop_coroutine_handle.h
+++ b/libcxx/include/__coroutine/noop_coroutine_handle.h
@@ -28,7 +28,7 @@ struct noop_coroutine_promise {};
// [coroutine.handle.noop]
template <>
-struct _LIBCPP_TEMPLATE_VIS coroutine_handle<noop_coroutine_promise> {
+struct [[__libcpp_template_vis]] coroutine_handle<noop_coroutine_promise> {
public:
// [coroutine.handle.noop.conv], conversion
_LIBCPP_HIDE_FROM_ABI constexpr operator coroutine_handle<>() const noexcept {
diff --git a/libcxx/include/__exception/operations.h b/libcxx/include/__exception/operations.h
index 15520c558a0b4..fce7371a394ce 100644
--- a/libcxx/include/__exception/operations.h
+++ b/libcxx/include/__exception/operations.h
@@ -29,7 +29,7 @@ _LIBCPP_EXPORTED_FROM_ABI terminate_handler set_terminate(terminate_handler) _NO
_LIBCPP_EXPORTED_FROM_ABI terminate_handler get_terminate() _NOEXCEPT;
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION)
-_LIBCPP_EXPORTED_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX17 bool uncaught_exception() _NOEXCEPT;
+[[__libcpp_deprecated_in_cxx17()]] _LIBCPP_EXPORTED_FROM_ABI bool uncaught_exception() _NOEXCEPT;
#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION)
_LIBCPP_EXPORTED_FROM_ABI int uncaught_exceptions() _NOEXCEPT;
diff --git a/libcxx/include/__filesystem/u8path.h b/libcxx/include/__filesystem/u8path.h
index e13980298d9e9..fccd0aa58e238 100644
--- a/libcxx/include/__filesystem/u8path.h
+++ b/libcxx/include/__filesystem/u8path.h
@@ -32,7 +32,7 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
template <class _InputIt, __enable_if_t<__is_pathable<_InputIt>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(_InputIt __f, _InputIt __l) {
+_LIBCPP_HIDE_FROM_ABI [[__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 ||
@@ -54,7 +54,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(_InputIt __f,
# if defined(_LIBCPP_WIN32API)
template <class _InputIt, __enable_if_t<__is_pathable<_InputIt>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(_InputIt __f, _NullSentinel) {
+_LIBCPP_HIDE_FROM_ABI [[__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 ||
@@ -75,7 +75,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(_InputIt __f,
# endif /* _LIBCPP_WIN32API */
template <class _Source, __enable_if_t<__is_pathable<_Source>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_WITH_CHAR8_T path u8path(const _Source& __s) {
+_LIBCPP_HIDE_FROM_ABI [[__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/__format/buffer.h b/libcxx/include/__format/buffer.h
index c88b7f3222010..17efdc00a4c13 100644
--- a/libcxx/include/__format/buffer.h
+++ b/libcxx/include/__format/buffer.h
@@ -179,7 +179,7 @@ class _LIBCPP_HIDE_FROM_ABI __max_output_size {
/// The latter option allows formatted_size to use the output buffer without
/// ever writing anything to the buffer.
template <__fmt_char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __output_buffer {
+class [[__libcpp_template_vis]] __output_buffer {
public:
using value_type _LIBCPP_NODEBUG = _CharT;
using __prepare_write_type _LIBCPP_NODEBUG = void (*)(__output_buffer<_CharT>&, size_t);
@@ -339,18 +339,18 @@ concept __insertable =
/// Extract the container type of a \ref back_insert_iterator.
template <class _It>
-struct _LIBCPP_TEMPLATE_VIS __back_insert_iterator_container {
+struct [[__libcpp_template_vis]] __back_insert_iterator_container {
using type _LIBCPP_NODEBUG = void;
};
template <__insertable _Container>
-struct _LIBCPP_TEMPLATE_VIS __back_insert_iterator_container<back_insert_iterator<_Container>> {
+struct [[__libcpp_template_vis]] __back_insert_iterator_container<back_insert_iterator<_Container>> {
using type _LIBCPP_NODEBUG = _Container;
};
// A dynamically growing buffer.
template <__fmt_char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __allocating_buffer : public __output_buffer<_CharT> {
+class [[__libcpp_template_vis]] __allocating_buffer : public __output_buffer<_CharT> {
public:
__allocating_buffer(const __allocating_buffer&) = delete;
__allocating_buffer& operator=(const __allocating_buffer&) = delete;
@@ -407,7 +407,7 @@ class _LIBCPP_TEMPLATE_VIS __allocating_buffer : public __output_buffer<_CharT>
// A buffer that directly writes to the underlying buffer.
template <class _OutIt, __fmt_char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __direct_iterator_buffer : public __output_buffer<_CharT> {
+class [[__libcpp_template_vis]] __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} {}
@@ -436,7 +436,7 @@ class _LIBCPP_TEMPLATE_VIS __direct_iterator_buffer : public __output_buffer<_Ch
// A buffer that writes its output to the end of a container.
template <class _OutIt, __fmt_char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __container_inserter_buffer : public __output_buffer<_CharT> {
+class [[__libcpp_template_vis]] __container_inserter_buffer : public __output_buffer<_CharT> {
public:
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI explicit __container_inserter_buffer(_OutIt __out_it)
: __container_inserter_buffer{__out_it, nullptr} {}
@@ -477,7 +477,7 @@ class _LIBCPP_TEMPLATE_VIS __container_inserter_buffer : public __output_buffer<
// Unlike the __container_inserter_buffer this class' performance does benefit
// from allocating and then inserting.
template <class _OutIt, __fmt_char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __iterator_buffer : public __allocating_buffer<_CharT> {
+class [[__libcpp_template_vis]] __iterator_buffer : public __allocating_buffer<_CharT> {
public:
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI explicit __iterator_buffer(_OutIt __out_it)
: __allocating_buffer<_CharT>{}, __out_it_{std::move(__out_it)} {}
@@ -495,7 +495,7 @@ class _LIBCPP_TEMPLATE_VIS __iterator_buffer : public __allocating_buffer<_CharT
// Selects the type of the buffer used for the output iterator.
template <class _OutIt, __fmt_char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __buffer_selector {
+class [[__libcpp_template_vis]] __buffer_selector {
using _Container _LIBCPP_NODEBUG = __back_insert_iterator_container<_OutIt>::type;
public:
@@ -509,7 +509,7 @@ class _LIBCPP_TEMPLATE_VIS __buffer_selector {
// A buffer that counts and limits the number of insertions.
template <class _OutIt, __fmt_char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer : private __buffer_selector<_OutIt, _CharT>::type {
+class [[__libcpp_template_vis]] __format_to_n_buffer : private __buffer_selector<_OutIt, _CharT>::type {
public:
using _Base _LIBCPP_NODEBUG = __buffer_selector<_OutIt, _CharT>::type;
@@ -533,7 +533,7 @@ class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer : private __buffer_selector<_Out
// Since formatted_size only needs to know the size, the output itself is
// discarded.
template <__fmt_char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __formatted_size_buffer : private __output_buffer<_CharT> {
+class [[__libcpp_template_vis]] __formatted_size_buffer : private __output_buffer<_CharT> {
public:
using _Base _LIBCPP_NODEBUG = __output_buffer<_CharT>;
@@ -576,7 +576,7 @@ class _LIBCPP_TEMPLATE_VIS __formatted_size_buffer : private __output_buffer<_Ch
// This class uses its own buffer management, since using vector
// would lead to a circular include with formatter for vector<bool>.
template <__fmt_char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __retarget_buffer {
+class [[__libcpp_template_vis]] __retarget_buffer {
using _Alloc _LIBCPP_NODEBUG = allocator<_CharT>;
public:
diff --git a/libcxx/include/__format/container_adaptor.h b/libcxx/include/__format/container_adaptor.h
index 48d42ee7d901b..cbd8b2c335919 100644
--- a/libcxx/include/__format/container_adaptor.h
+++ b/libcxx/include/__format/container_adaptor.h
@@ -35,7 +35,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// adaptor headers. To use the format functions users already include <format>.
template <class _Adaptor, class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __formatter_container_adaptor {
+struct [[__libcpp_template_vis]] __formatter_container_adaptor {
private:
using __maybe_const_container _LIBCPP_NODEBUG = __fmt_maybe_const<typename _Adaptor::container_type, _CharT>;
using __maybe_const_adaptor _LIBCPP_NODEBUG = __maybe_const<is_const_v<__maybe_const_container>, _Adaptor>;
@@ -55,15 +55,15 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_container_adaptor {
};
template <class _CharT, class _Tp, formattable<_CharT> _Container>
-struct _LIBCPP_TEMPLATE_VIS formatter<queue<_Tp, _Container>, _CharT>
+struct [[__libcpp_template_vis]] formatter<queue<_Tp, _Container>, _CharT>
: public __formatter_container_adaptor<queue<_Tp, _Container>, _CharT> {};
template <class _CharT, class _Tp, class _Container, class _Compare>
-struct _LIBCPP_TEMPLATE_VIS formatter<priority_queue<_Tp, _Container, _Compare>, _CharT>
+struct [[__libcpp_template_vis]] formatter<priority_queue<_Tp, _Container, _Compare>, _CharT>
: public __formatter_container_adaptor<priority_queue<_Tp, _Container, _Compare>, _CharT> {};
template <class _CharT, class _Tp, formattable<_CharT> _Container>
-struct _LIBCPP_TEMPLATE_VIS formatter<stack<_Tp, _Container>, _CharT>
+struct [[__libcpp_template_vis]] formatter<stack<_Tp, _Container>, _CharT>
: public __formatter_container_adaptor<stack<_Tp, _Container>, _CharT> {};
#endif // _LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h
index 10f0ba9928ce7..1b69972ec3036 100644
--- a/libcxx/include/__format/format_arg.h
+++ b/libcxx/include/__format/format_arg.h
@@ -277,9 +277,9 @@ class __basic_format_arg_value {
};
template <class _Context>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS basic_format_arg {
+class [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS basic_format_arg {
public:
- class _LIBCPP_TEMPLATE_VIS handle;
+ class [[__libcpp_template_vis]] handle;
_LIBCPP_HIDE_FROM_ABI basic_format_arg() noexcept : __type_{__format::__arg_t::__none} {}
@@ -355,7 +355,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS basic_format_arg {
};
template <class _Context>
-class _LIBCPP_TEMPLATE_VIS basic_format_arg<_Context>::handle {
+class [[__libcpp_template_vis]] basic_format_arg<_Context>::handle {
public:
_LIBCPP_HIDE_FROM_ABI void format(basic_format_parse_context<char_type>& __parse_ctx, _Context& __ctx) const {
__handle_.__format_(__parse_ctx, __ctx, __handle_.__ptr_);
@@ -372,10 +372,9 @@ class _LIBCPP_TEMPLATE_VIS basic_format_arg<_Context>::handle {
// the "variant" in a handle to stay conforming. See __arg_t for more details.
template <class _Visitor, class _Context>
# if _LIBCPP_STD_VER >= 26 && _LIBCPP_HAS_EXPLICIT_THIS_PARAMETER
-_LIBCPP_DEPRECATED_IN_CXX26
+[[__libcpp_deprecated_in_cxx26()]]
# endif
- _LIBCPP_HIDE_FROM_ABI decltype(auto)
- visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
+_LIBCPP_HIDE_FROM_ABI 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 c6c7fdeedcfe6..642c5ca1e4c5b 100644
--- a/libcxx/include/__format/format_arg_store.h
+++ b/libcxx/include/__format/format_arg_store.h
@@ -247,7 +247,7 @@ struct __unpacked_format_arg_store {
} // namespace __format
template <class _Context, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS __format_arg_store {
+struct [[__libcpp_template_vis]] __format_arg_store {
_LIBCPP_HIDE_FROM_ABI __format_arg_store(_Args&... __args) noexcept {
if constexpr (sizeof...(_Args) != 0) {
if constexpr (__format::__use_packed_format_arg_store(sizeof...(_Args)))
diff --git a/libcxx/include/__format/format_args.h b/libcxx/include/__format/format_args.h
index b98663c06ea4d..96647f2886c58 100644
--- a/libcxx/include/__format/format_args.h
+++ b/libcxx/include/__format/format_args.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <class _Context>
-class _LIBCPP_TEMPLATE_VIS basic_format_args {
+class [[__libcpp_template_vis]] basic_format_args {
public:
template <class... _Args>
_LIBCPP_HIDE_FROM_ABI basic_format_args(const __format_arg_store<_Context, _Args...>& __store) noexcept
diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h
index 4dbfdbc02a267..86a148e921781 100644
--- a/libcxx/include/__format/format_context.h
+++ b/libcxx/include/__format/format_context.h
@@ -42,7 +42,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _OutIt, class _CharT>
requires output_iterator<_OutIt, const _CharT&>
-class _LIBCPP_TEMPLATE_VIS basic_format_context;
+class [[__libcpp_template_vis]] basic_format_context;
# if _LIBCPP_HAS_LOCALIZATION
/**
@@ -72,13 +72,8 @@ using wformat_context = basic_format_context< back_insert_iterator<__format::__o
template <class _OutIt, class _CharT>
requires output_iterator<_OutIt, const _CharT&>
-class
- // clang-format off
- _LIBCPP_TEMPLATE_VIS
- _LIBCPP_PREFERRED_NAME(format_context)
- _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wformat_context))
- // clang-format on
- basic_format_context {
+class [[__libcpp_template_vis]] _LIBCPP_PREFERRED_NAME(format_context)
+ _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wformat_context)) basic_format_context {
public:
using iterator = _OutIt;
using char_type = _CharT;
@@ -153,7 +148,7 @@ class
// Here the width of an element in input is determined dynamically.
// Note when the top-level element has no width the retargeting is not needed.
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS basic_format_context<typename __format::__retarget_buffer<_CharT>::__iterator, _CharT> {
+class [[__libcpp_template_vis]] basic_format_context<typename __format::__retarget_buffer<_CharT>::__iterator, _CharT> {
public:
using iterator = typename __format::__retarget_buffer<_CharT>::__iterator;
using char_type = _CharT;
diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h
index 5feaf7e5a064a..7eae4356b1227 100644
--- a/libcxx/include/__format/format_functions.h
+++ b/libcxx/include/__format/format_functions.h
@@ -83,7 +83,7 @@ namespace __format {
/// When parsing a handle which is not enabled the code is ill-formed.
/// This helper uses the parser of the appropriate formatter for the stored type.
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS __compile_time_handle {
+class [[__libcpp_template_vis]] __compile_time_handle {
public:
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr void __parse(_ParseContext& __ctx) const {
@@ -110,7 +110,7 @@ class _LIBCPP_TEMPLATE_VIS __compile_time_handle {
// Dummy format_context only providing the parts used during constant
// validation of the basic_format_string.
template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __compile_time_basic_format_context {
+struct [[__libcpp_template_vis]] __compile_time_basic_format_context {
public:
using char_type = _CharT;
@@ -339,12 +339,12 @@ _LIBCPP_HIDE_FROM_ABI constexpr typename _Ctx::iterator __vformat_to(_ParseCtx&&
# if _LIBCPP_STD_VER >= 26
template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __runtime_format_string {
+struct [[__libcpp_template_vis]] __runtime_format_string {
private:
basic_string_view<_CharT> __str_;
template <class _Cp, class... _Args>
- friend struct _LIBCPP_TEMPLATE_VIS basic_format_string;
+ friend struct basic_format_string;
public:
_LIBCPP_HIDE_FROM_ABI __runtime_format_string(basic_string_view<_CharT> __s) noexcept : __str_(__s) {}
@@ -362,7 +362,7 @@ _LIBCPP_HIDE_FROM_ABI inline __runtime_format_string<wchar_t> runtime_format(wst
# endif // _LIBCPP_STD_VER >= 26
template <class _CharT, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS basic_format_string {
+struct [[__libcpp_template_vis]] basic_format_string {
template <class _Tp>
requires convertible_to<const _Tp&, basic_string_view<_CharT>>
consteval basic_format_string(const _Tp& __str) : __str_{__str} {
diff --git a/libcxx/include/__format/format_parse_context.h b/libcxx/include/__format/format_parse_context.h
index 459db751c9df0..b5aef0e453668 100644
--- a/libcxx/include/__format/format_parse_context.h
+++ b/libcxx/include/__format/format_parse_context.h
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS basic_format_parse_context {
+class [[__libcpp_template_vis]] basic_format_parse_context {
public:
using char_type = _CharT;
using const_iterator = typename basic_string_view<_CharT>::const_iterator;
diff --git a/libcxx/include/__format/format_string.h b/libcxx/include/__format/format_string.h
index 5db5973dd5889..c260e1bf67812 100644
--- a/libcxx/include/__format/format_string.h
+++ b/libcxx/include/__format/format_string.h
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace __format {
template <contiguous_iterator _Iterator>
-struct _LIBCPP_TEMPLATE_VIS __parse_number_result {
+struct [[__libcpp_template_vis]] __parse_number_result {
_Iterator __last;
uint32_t __value;
};
diff --git a/libcxx/include/__format/format_to_n_result.h b/libcxx/include/__format/format_to_n_result.h
index 344299e32f0ee..5e873888e1ecd 100644
--- a/libcxx/include/__format/format_to_n_result.h
+++ b/libcxx/include/__format/format_to_n_result.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <class _OutIt>
-struct _LIBCPP_TEMPLATE_VIS format_to_n_result {
+struct [[__libcpp_template_vis]] format_to_n_result {
_OutIt out;
iter_difference_t<_OutIt> size;
};
diff --git a/libcxx/include/__format/formatter.h b/libcxx/include/__format/formatter.h
index e8386f5ca9c79..d9b76e25c2693 100644
--- a/libcxx/include/__format/formatter.h
+++ b/libcxx/include/__format/formatter.h
@@ -37,7 +37,7 @@ struct __disabled_formatter {
/// - is_copy_assignable_v<F>, and
/// - is_move_assignable_v<F>.
template <class _Tp, class _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter : __disabled_formatter {};
+struct [[__libcpp_template_vis]] formatter : __disabled_formatter {};
# if _LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/__format/formatter_bool.h b/libcxx/include/__format/formatter_bool.h
index d08acd474439c..816fdf6da38c0 100644
--- a/libcxx/include/__format/formatter_bool.h
+++ b/libcxx/include/__format/formatter_bool.h
@@ -33,7 +33,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<bool, _CharT> {
+struct [[__libcpp_template_vis]] formatter<bool, _CharT> {
public:
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
diff --git a/libcxx/include/__format/formatter_char.h b/libcxx/include/__format/formatter_char.h
index 8b8fd2d42c9f3..f2e70cd3625e6 100644
--- a/libcxx/include/__format/formatter_char.h
+++ b/libcxx/include/__format/formatter_char.h
@@ -31,7 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS __formatter_char {
+struct [[__libcpp_template_vis]] __formatter_char {
public:
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -75,14 +75,14 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_char {
};
template <>
-struct _LIBCPP_TEMPLATE_VIS formatter<char, char> : public __formatter_char<char> {};
+struct [[__libcpp_template_vis]] formatter<char, char> : public __formatter_char<char> {};
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
-struct _LIBCPP_TEMPLATE_VIS formatter<char, wchar_t> : public __formatter_char<wchar_t> {};
+struct [[__libcpp_template_vis]] formatter<char, wchar_t> : public __formatter_char<wchar_t> {};
template <>
-struct _LIBCPP_TEMPLATE_VIS formatter<wchar_t, wchar_t> : public __formatter_char<wchar_t> {};
+struct [[__libcpp_template_vis]] formatter<wchar_t, wchar_t> : public __formatter_char<wchar_t> {};
# endif // _LIBCPP_HAS_WIDE_CHARACTERS
# if _LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/__format/formatter_floating_point.h b/libcxx/include/__format/formatter_floating_point.h
index abd3e9351fd1e..4902dcca59101 100644
--- a/libcxx/include/__format/formatter_floating_point.h
+++ b/libcxx/include/__format/formatter_floating_point.h
@@ -141,7 +141,7 @@ struct __traits<double> {
/// Depending on the maximum size required for a value, the buffer is allocated
/// on the stack or the heap.
template <floating_point _Fp>
-class _LIBCPP_TEMPLATE_VIS __float_buffer {
+class [[__libcpp_template_vis]] __float_buffer {
using _Traits _LIBCPP_NODEBUG = __traits<_Fp>;
public:
@@ -751,7 +751,7 @@ __format_floating_point(_Tp __value, _FormatContext& __ctx, __format_spec::__par
} // namespace __formatter
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS __formatter_floating_point {
+struct [[__libcpp_template_vis]] __formatter_floating_point {
public:
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -769,11 +769,11 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_floating_point {
};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<float, _CharT> : public __formatter_floating_point<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<float, _CharT> : public __formatter_floating_point<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<double, _CharT> : public __formatter_floating_point<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<double, _CharT> : public __formatter_floating_point<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<long double, _CharT> : public __formatter_floating_point<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<long double, _CharT> : public __formatter_floating_point<_CharT> {};
# if _LIBCPP_STD_VER >= 23
template <>
diff --git a/libcxx/include/__format/formatter_integer.h b/libcxx/include/__format/formatter_integer.h
index 3f51b10d75aac..3d1a241986bd1 100644
--- a/libcxx/include/__format/formatter_integer.h
+++ b/libcxx/include/__format/formatter_integer.h
@@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS __formatter_integer {
+struct [[__libcpp_template_vis]] __formatter_integer {
public:
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -58,34 +58,34 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_integer {
// Signed integral types.
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<signed char, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<signed char, _CharT> : public __formatter_integer<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<short, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<short, _CharT> : public __formatter_integer<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<int, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<int, _CharT> : public __formatter_integer<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<long, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<long, _CharT> : public __formatter_integer<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<long long, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<long long, _CharT> : public __formatter_integer<_CharT> {};
# if _LIBCPP_HAS_INT128
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<__int128_t, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<__int128_t, _CharT> : public __formatter_integer<_CharT> {};
# endif
// Unsigned integral types.
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<unsigned char, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<unsigned char, _CharT> : public __formatter_integer<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<unsigned short, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<unsigned short, _CharT> : public __formatter_integer<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<unsigned, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<unsigned, _CharT> : public __formatter_integer<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<unsigned long, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<unsigned long, _CharT> : public __formatter_integer<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<unsigned long long, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<unsigned long long, _CharT> : public __formatter_integer<_CharT> {};
# if _LIBCPP_HAS_INT128
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<__uint128_t, _CharT> : public __formatter_integer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<__uint128_t, _CharT> : public __formatter_integer<_CharT> {};
# endif
# if _LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/__format/formatter_integral.h b/libcxx/include/__format/formatter_integral.h
index f9f106f4065f9..1f8ad92fed6ee 100644
--- a/libcxx/include/__format/formatter_integral.h
+++ b/libcxx/include/__format/formatter_integral.h
@@ -404,17 +404,17 @@ __format_integer(_Tp __value, _FormatContext& __ctx, __format_spec::__parsed_spe
//
template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __bool_strings;
+struct [[__libcpp_template_vis]] __bool_strings;
template <>
-struct _LIBCPP_TEMPLATE_VIS __bool_strings<char> {
+struct [[__libcpp_template_vis]] __bool_strings<char> {
static constexpr string_view __true{"true"};
static constexpr string_view __false{"false"};
};
# if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
-struct _LIBCPP_TEMPLATE_VIS __bool_strings<wchar_t> {
+struct [[__libcpp_template_vis]] __bool_strings<wchar_t> {
static constexpr wstring_view __true{L"true"};
static constexpr wstring_view __false{L"false"};
};
diff --git a/libcxx/include/__format/formatter_pointer.h b/libcxx/include/__format/formatter_pointer.h
index 4ef48c168d0d8..1efd107c3e9dc 100644
--- a/libcxx/include/__format/formatter_pointer.h
+++ b/libcxx/include/__format/formatter_pointer.h
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS __formatter_pointer {
+struct [[__libcpp_template_vis]] __formatter_pointer {
public:
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -59,11 +59,11 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_pointer {
// - template<> struct formatter<void*, charT>;
// - template<> struct formatter<const void*, charT>;
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<nullptr_t, _CharT> : public __formatter_pointer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<nullptr_t, _CharT> : public __formatter_pointer<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<void*, _CharT> : public __formatter_pointer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<void*, _CharT> : public __formatter_pointer<_CharT> {};
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<const void*, _CharT> : public __formatter_pointer<_CharT> {};
+struct [[__libcpp_template_vis]] formatter<const void*, _CharT> : public __formatter_pointer<_CharT> {};
# if _LIBCPP_STD_VER >= 23
template <>
diff --git a/libcxx/include/__format/formatter_string.h b/libcxx/include/__format/formatter_string.h
index 112c731e67ed7..1dde4011e48a1 100644
--- a/libcxx/include/__format/formatter_string.h
+++ b/libcxx/include/__format/formatter_string.h
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS __formatter_string {
+struct [[__libcpp_template_vis]] __formatter_string {
public:
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
@@ -58,7 +58,7 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_string {
// Formatter const char*.
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<const _CharT*, _CharT> : public __formatter_string<_CharT> {
+struct [[__libcpp_template_vis]] formatter<const _CharT*, _CharT> : public __formatter_string<_CharT> {
using _Base _LIBCPP_NODEBUG = __formatter_string<_CharT>;
template <class _FormatContext>
@@ -77,7 +77,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<const _CharT*, _CharT> : public __formatte
// Formatter char*.
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<_CharT*, _CharT> : public formatter<const _CharT*, _CharT> {
+struct [[__libcpp_template_vis]] formatter<_CharT*, _CharT> : public formatter<const _CharT*, _CharT> {
using _Base _LIBCPP_NODEBUG = formatter<const _CharT*, _CharT>;
template <class _FormatContext>
@@ -88,7 +88,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<_CharT*, _CharT> : public formatter<const
// Formatter char[].
template <__fmt_char_type _CharT, size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS formatter<_CharT[_Size], _CharT> : public __formatter_string<_CharT> {
+struct [[__libcpp_template_vis]] formatter<_CharT[_Size], _CharT> : public __formatter_string<_CharT> {
using _Base _LIBCPP_NODEBUG = __formatter_string<_CharT>;
template <class _FormatContext>
@@ -100,7 +100,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<_CharT[_Size], _CharT> : public __formatte
// Formatter std::string.
template <__fmt_char_type _CharT, class _Traits, class _Allocator>
-struct _LIBCPP_TEMPLATE_VIS formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT>
+struct [[__libcpp_template_vis]] formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT>
: public __formatter_string<_CharT> {
using _Base _LIBCPP_NODEBUG = __formatter_string<_CharT>;
@@ -114,7 +114,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<basic_string<_CharT, _Traits, _Allocator>,
// Formatter std::string_view.
template <__fmt_char_type _CharT, class _Traits>
-struct _LIBCPP_TEMPLATE_VIS formatter<basic_string_view<_CharT, _Traits>, _CharT> : public __formatter_string<_CharT> {
+struct [[__libcpp_template_vis]] formatter<basic_string_view<_CharT, _Traits>, _CharT> : public __formatter_string<_CharT> {
using _Base _LIBCPP_NODEBUG = __formatter_string<_CharT>;
template <class _FormatContext>
diff --git a/libcxx/include/__format/formatter_tuple.h b/libcxx/include/__format/formatter_tuple.h
index bb841ef11440d..32bd2e910dc2a 100644
--- a/libcxx/include/__format/formatter_tuple.h
+++ b/libcxx/include/__format/formatter_tuple.h
@@ -36,7 +36,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 23
template <__fmt_char_type _CharT, class _Tuple, formattable<_CharT>... _Args>
-struct _LIBCPP_TEMPLATE_VIS __formatter_tuple {
+struct [[__libcpp_template_vis]] __formatter_tuple {
_LIBCPP_HIDE_FROM_ABI constexpr void set_separator(basic_string_view<_CharT> __separator) noexcept {
__separator_ = __separator;
}
@@ -136,11 +136,11 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_tuple {
};
template <__fmt_char_type _CharT, formattable<_CharT>... _Args>
-struct _LIBCPP_TEMPLATE_VIS formatter<pair<_Args...>, _CharT>
+struct [[__libcpp_template_vis]] formatter<pair<_Args...>, _CharT>
: public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {};
template <__fmt_char_type _CharT, formattable<_CharT>... _Args>
-struct _LIBCPP_TEMPLATE_VIS formatter<tuple<_Args...>, _CharT>
+struct [[__libcpp_template_vis]] formatter<tuple<_Args...>, _CharT>
: public __formatter_tuple<_CharT, tuple<_Args...>, _Args...> {};
#endif // _LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h
index 415261acf0ffe..56f39e16d78b7 100644
--- a/libcxx/include/__format/parser_std_format_spec.h
+++ b/libcxx/include/__format/parser_std_format_spec.h
@@ -335,7 +335,7 @@ static_assert(is_trivially_copyable_v<__parsed_specifications<wchar_t>>);
/// set to zero. That way they can be repurposed if a future revision of the
/// Standards adds new fields to std-format-spec.
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS __parser {
+class [[__libcpp_template_vis]] __parser {
public:
// Parses the format specification.
//
diff --git a/libcxx/include/__format/range_default_formatter.h b/libcxx/include/__format/range_default_formatter.h
index bb4c520f5ea11..4de885c28a3bf 100644
--- a/libcxx/include/__format/range_default_formatter.h
+++ b/libcxx/include/__format/range_default_formatter.h
@@ -52,7 +52,7 @@ _LIBCPP_DIAGNOSTIC_POP
// There is no definition of this struct, it's purely intended to be used to
// generate diagnostics.
template <class _Rp>
-struct _LIBCPP_TEMPLATE_VIS __instantiated_the_primary_template_of_format_kind;
+struct [[__libcpp_template_vis]] __instantiated_the_primary_template_of_format_kind;
template <class _Rp>
constexpr range_format format_kind = [] {
@@ -88,12 +88,12 @@ inline constexpr range_format format_kind<_Rp> = [] {
}();
template <range_format _Kp, ranges::input_range _Rp, class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __range_default_formatter;
+struct [[__libcpp_template_vis]] __range_default_formatter;
// Required specializations
template <ranges::input_range _Rp, class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::sequence, _Rp, _CharT> {
+struct [[__libcpp_template_vis]] __range_default_formatter<range_format::sequence, _Rp, _CharT> {
private:
using __maybe_const_r _LIBCPP_NODEBUG = __fmt_maybe_const<_Rp, _CharT>;
range_formatter<remove_cvref_t<ranges::range_reference_t<__maybe_const_r>>, _CharT> __underlying_;
@@ -120,7 +120,7 @@ struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::sequence, _R
};
template <ranges::input_range _Rp, class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::map, _Rp, _CharT> {
+struct [[__libcpp_template_vis]] __range_default_formatter<range_format::map, _Rp, _CharT> {
private:
using __maybe_const_map _LIBCPP_NODEBUG = __fmt_maybe_const<_Rp, _CharT>;
using __element_type _LIBCPP_NODEBUG = remove_cvref_t<ranges::range_reference_t<__maybe_const_map>>;
@@ -148,7 +148,7 @@ struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::map, _Rp, _C
};
template <ranges::input_range _Rp, class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::set, _Rp, _CharT> {
+struct [[__libcpp_template_vis]] __range_default_formatter<range_format::set, _Rp, _CharT> {
private:
using __maybe_const_set _LIBCPP_NODEBUG = __fmt_maybe_const<_Rp, _CharT>;
using __element_type _LIBCPP_NODEBUG = remove_cvref_t<ranges::range_reference_t<__maybe_const_set>>;
@@ -173,7 +173,7 @@ struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<range_format::set, _Rp, _C
template <range_format _Kp, ranges::input_range _Rp, class _CharT>
requires(_Kp == range_format::string || _Kp == range_format::debug_string)
-struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<_Kp, _Rp, _CharT> {
+struct [[__libcpp_template_vis]] __range_default_formatter<_Kp, _Rp, _CharT> {
private:
// This deviates from the Standard, there the exposition only type is
// formatter<basic_string<charT>, charT> underlying_;
@@ -205,7 +205,7 @@ struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<_Kp, _Rp, _CharT> {
template <ranges::input_range _Rp, class _CharT>
requires(format_kind<_Rp> != range_format::disabled && formattable<ranges::range_reference_t<_Rp>, _CharT>)
-struct _LIBCPP_TEMPLATE_VIS formatter<_Rp, _CharT> : __range_default_formatter<format_kind<_Rp>, _Rp, _CharT> {};
+struct [[__libcpp_template_vis]] formatter<_Rp, _CharT> : __range_default_formatter<format_kind<_Rp>, _Rp, _CharT> {};
#endif // _LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/__format/range_formatter.h b/libcxx/include/__format/range_formatter.h
index def55c86ce51c..f8073e9bfd124 100644
--- a/libcxx/include/__format/range_formatter.h
+++ b/libcxx/include/__format/range_formatter.h
@@ -39,7 +39,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _CharT = char>
requires same_as<remove_cvref_t<_Tp>, _Tp> && formattable<_Tp, _CharT>
-struct _LIBCPP_TEMPLATE_VIS range_formatter {
+struct [[__libcpp_template_vis]] range_formatter {
_LIBCPP_HIDE_FROM_ABI constexpr void set_separator(basic_string_view<_CharT> __separator) noexcept {
__separator_ = __separator;
}
diff --git a/libcxx/include/__functional/binary_function.h b/libcxx/include/__functional/binary_function.h
index bde8b03ef8281..4a0c9acb3e574 100644
--- a/libcxx/include/__functional/binary_function.h
+++ b/libcxx/include/__functional/binary_function.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
template <class _Arg1, class _Arg2, class _Result>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binary_function {
+struct [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]] binary_function {
typedef _Arg1 first_argument_type;
typedef _Arg2 second_argument_type;
typedef _Result result_type;
@@ -32,9 +32,9 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binary_function {
template <class _Arg1, class _Arg2, class _Result>
struct __binary_function_keep_layout_base {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using first_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg1;
- using second_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg2;
- using result_type _LIBCPP_DEPRECATED_IN_CXX17 = _Result;
+ using first_argument_type [[__libcpp_deprecated_in_cxx17()]] = _Arg1;
+ using second_argument_type [[__libcpp_deprecated_in_cxx17()]] = _Arg2;
+ using result_type [[__libcpp_deprecated_in_cxx17()]] = _Result;
#endif
};
diff --git a/libcxx/include/__functional/binary_negate.h b/libcxx/include/__functional/binary_negate.h
index ce52b5ae9fc49..8c5e6c15754e7 100644
--- a/libcxx/include/__functional/binary_negate.h
+++ b/libcxx/include/__functional/binary_negate.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
template <class _Predicate>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 binary_negate
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx17()]] binary_negate
: public __binary_function<typename _Predicate::first_argument_type,
typename _Predicate::second_argument_type,
bool> {
@@ -39,7 +39,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 binary_negate
};
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 _LIBCPP_HIDE_FROM_ABI binary_negate<_Predicate>
not2(const _Predicate& __pred) {
return binary_negate<_Predicate>(__pred);
}
diff --git a/libcxx/include/__functional/binder1st.h b/libcxx/include/__functional/binder1st.h
index 04b51fefab70a..f5f6047ba31d3 100644
--- a/libcxx/include/__functional/binder1st.h
+++ b/libcxx/include/__functional/binder1st.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
template <class _Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st
- : public __unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> {
+class [[__libcpp_template_vis, __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;
@@ -42,7 +42,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st
};
template <class _Operation, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI binder1st<_Operation>
+[[__libcpp_deprecated_in_cxx11()]] inline _LIBCPP_HIDE_FROM_ABI 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 9d22e4430b1b3..e75d6615fc854 100644
--- a/libcxx/include/__functional/binder2nd.h
+++ b/libcxx/include/__functional/binder2nd.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
template <class _Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
- : public __unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> {
+class [[__libcpp_template_vis, __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;
@@ -42,7 +42,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
};
template <class _Operation, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI binder2nd<_Operation>
+[[__libcpp_deprecated_in_cxx11()]] inline _LIBCPP_HIDE_FROM_ABI 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 1e49cc5464be5..4651218fe1947 100644
--- a/libcxx/include/__functional/boyer_moore_searcher.h
+++ b/libcxx/include/__functional/boyer_moore_searcher.h
@@ -88,7 +88,7 @@ class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, true> {
template <class _RandomAccessIterator1,
class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TEMPLATE_VIS boyer_moore_searcher {
+class [[__libcpp_template_vis]] boyer_moore_searcher {
private:
using difference_type = typename std::iterator_traits<_RandomAccessIterator1>::difference_type;
using value_type = typename std::iterator_traits<_RandomAccessIterator1>::value_type;
@@ -219,7 +219,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(boyer_moore_searcher);
template <class _RandomAccessIterator1,
class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TEMPLATE_VIS boyer_moore_horspool_searcher {
+class [[__libcpp_template_vis]] boyer_moore_horspool_searcher {
private:
using difference_type = typename iterator_traits<_RandomAccessIterator1>::difference_type;
using value_type = typename iterator_traits<_RandomAccessIterator1>::value_type;
diff --git a/libcxx/include/__functional/default_searcher.h b/libcxx/include/__functional/default_searcher.h
index db89d10757c1b..6e9d4b33478f7 100644
--- a/libcxx/include/__functional/default_searcher.h
+++ b/libcxx/include/__functional/default_searcher.h
@@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// default searcher
template <class _ForwardIterator, class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TEMPLATE_VIS default_searcher {
+class [[__libcpp_template_vis]] default_searcher {
public:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
default_searcher(_ForwardIterator __f, _ForwardIterator __l, _BinaryPredicate __p = _BinaryPredicate())
diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index cb800c6b3d192..a304428a233a5 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -86,7 +86,7 @@ _LIBCPP_DIAGNOSTIC_POP
}
template <class _Fp>
-class _LIBCPP_TEMPLATE_VIS function; // undefined
+class [[__libcpp_template_vis]] function; // undefined
namespace __function {
@@ -234,7 +234,7 @@ class __default_alloc_func<_Fp, _Rp(_ArgTypes...)> {
// __base provides an abstract interface for copyable functors.
template <class _Fp>
-class _LIBCPP_TEMPLATE_VIS __base;
+class [[__libcpp_template_vis]] __base;
template <class _Rp, class... _ArgTypes>
class __base<_Rp(_ArgTypes...)> {
@@ -827,7 +827,7 @@ class __func<_Rp1 (^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)> : public __base
} // namespace __function
template <class _Rp, class... _ArgTypes>
-class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
+class [[__libcpp_template_vis]] function<_Rp(_ArgTypes...)>
: public __function::__maybe_derive_from_unary_function<_Rp(_ArgTypes...)>,
public __function::__maybe_derive_from_binary_function<_Rp(_ArgTypes...)> {
# ifndef _LIBCPP_ABI_OPTIMIZED_FUNCTION
diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h
index df654c8707fed..5f08b500f3178 100644
--- a/libcxx/include/__functional/hash.h
+++ b/libcxx/include/__functional/hash.h
@@ -326,7 +326,7 @@ _LIBCPP_HIDE_FROM_ABI inline size_t __hash_combine(size_t __lhs, size_t __rhs) _
}
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash<_Tp*> : public __unary_function<_Tp*, size_t> {
+struct [[__libcpp_template_vis]] hash<_Tp*> : public __unary_function<_Tp*, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp* __v) const _NOEXCEPT {
union {
_Tp* __t;
@@ -338,76 +338,76 @@ struct _LIBCPP_TEMPLATE_VIS hash<_Tp*> : public __unary_function<_Tp*, size_t> {
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<bool> : public __unary_function<bool, size_t> {
+struct [[__libcpp_template_vis]] hash<bool> : public __unary_function<bool, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(bool __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char> : public __unary_function<char, size_t> {
+struct [[__libcpp_template_vis]] hash<char> : public __unary_function<char, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(char __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<signed char> : public __unary_function<signed char, size_t> {
+struct [[__libcpp_template_vis]] hash<signed char> : public __unary_function<signed char, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(signed char __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned char> : public __unary_function<unsigned char, size_t> {
+struct [[__libcpp_template_vis]] hash<unsigned char> : public __unary_function<unsigned char, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned char __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
#if _LIBCPP_HAS_CHAR8_T
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char8_t> : public __unary_function<char8_t, size_t> {
+struct [[__libcpp_template_vis]] hash<char8_t> : public __unary_function<char8_t, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(char8_t __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
#endif // _LIBCPP_HAS_CHAR8_T
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char16_t> : public __unary_function<char16_t, size_t> {
+struct [[__libcpp_template_vis]] hash<char16_t> : public __unary_function<char16_t, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(char16_t __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char32_t> : public __unary_function<char32_t, size_t> {
+struct [[__libcpp_template_vis]] hash<char32_t> : public __unary_function<char32_t, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(char32_t __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<wchar_t> : public __unary_function<wchar_t, size_t> {
+struct [[__libcpp_template_vis]] hash<wchar_t> : public __unary_function<wchar_t, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(wchar_t __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
#endif // _LIBCPP_HAS_WIDE_CHARACTERS
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<short> : public __unary_function<short, size_t> {
+struct [[__libcpp_template_vis]] hash<short> : public __unary_function<short, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(short __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned short> : public __unary_function<unsigned short, size_t> {
+struct [[__libcpp_template_vis]] hash<unsigned short> : public __unary_function<unsigned short, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned short __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<int> : public __unary_function<int, size_t> {
+struct [[__libcpp_template_vis]] hash<int> : public __unary_function<int, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(int __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned int> : public __unary_function<unsigned int, size_t> {
+struct [[__libcpp_template_vis]] hash<unsigned int> : public __unary_function<unsigned int, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned int __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<long> : public __unary_function<long, size_t> {
+struct [[__libcpp_template_vis]] hash<long> : public __unary_function<long, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(long __v) const _NOEXCEPT { return static_cast<size_t>(__v); }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned long> : public __unary_function<unsigned long, size_t> {
+struct [[__libcpp_template_vis]] hash<unsigned long> : public __unary_function<unsigned long, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned long __v) const _NOEXCEPT {
static_assert(sizeof(size_t) >= sizeof(unsigned long),
"This would be a terrible hash function on a platform where size_t is smaller than unsigned long");
@@ -416,23 +416,23 @@ struct _LIBCPP_TEMPLATE_VIS hash<unsigned long> : public __unary_function<unsign
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<long long> : public __scalar_hash<long long> {};
+struct [[__libcpp_template_vis]] hash<long long> : public __scalar_hash<long long> {};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned long long> : public __scalar_hash<unsigned long long> {};
+struct [[__libcpp_template_vis]] hash<unsigned long long> : public __scalar_hash<unsigned long long> {};
#if _LIBCPP_HAS_INT128
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<__int128_t> : public __scalar_hash<__int128_t> {};
+struct [[__libcpp_template_vis]] hash<__int128_t> : public __scalar_hash<__int128_t> {};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<__uint128_t> : public __scalar_hash<__uint128_t> {};
+struct [[__libcpp_template_vis]] hash<__uint128_t> : public __scalar_hash<__uint128_t> {};
#endif
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<float> : public __scalar_hash<float> {
+struct [[__libcpp_template_vis]] hash<float> : public __scalar_hash<float> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(float __v) const _NOEXCEPT {
// -0.0 and 0.0 should return same hash
if (__v == 0.0f)
@@ -442,7 +442,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<float> : public __scalar_hash<float> {
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<double> : public __scalar_hash<double> {
+struct [[__libcpp_template_vis]] hash<double> : public __scalar_hash<double> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(double __v) const _NOEXCEPT {
// -0.0 and 0.0 should return same hash
if (__v == 0.0)
@@ -452,7 +452,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<double> : public __scalar_hash<double> {
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<long double> : public __scalar_hash<long double> {
+struct [[__libcpp_template_vis]] hash<long double> : public __scalar_hash<long double> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(long double __v) const _NOEXCEPT {
// -0.0 and 0.0 should return same hash
if (__v == 0.0L)
@@ -494,26 +494,26 @@ struct _LIBCPP_TEMPLATE_VIS hash<long double> : public __scalar_hash<long double
};
template <class _Tp, bool = is_enum<_Tp>::value>
-struct _LIBCPP_TEMPLATE_VIS __enum_hash : public __unary_function<_Tp, size_t> {
+struct [[__libcpp_template_vis]] __enum_hash : public __unary_function<_Tp, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT {
typedef typename underlying_type<_Tp>::type type;
return hash<type>()(static_cast<type>(__v));
}
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS __enum_hash<_Tp, false> {
+struct [[__libcpp_template_vis]] __enum_hash<_Tp, false> {
__enum_hash() = delete;
__enum_hash(__enum_hash const&) = delete;
__enum_hash& operator=(__enum_hash const&) = delete;
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash : public __enum_hash<_Tp> {};
+struct [[__libcpp_template_vis]] hash : public __enum_hash<_Tp> {};
#if _LIBCPP_STD_VER >= 17
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t> : public __unary_function<nullptr_t, size_t> {
+struct [[__libcpp_template_vis]] hash<nullptr_t> : public __unary_function<nullptr_t, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(nullptr_t) const _NOEXCEPT { return 662607004ull; }
};
#endif
diff --git a/libcxx/include/__functional/mem_fun_ref.h b/libcxx/include/__functional/mem_fun_ref.h
index c344420b0299e..bef78b826f3b9 100644
--- a/libcxx/include/__functional/mem_fun_ref.h
+++ b/libcxx/include/__functional/mem_fun_ref.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_t : public __unary_function<_Tp*, _Sp> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]] mem_fun_t : public __unary_function<_Tp*, _Sp> {
_Sp (_Tp::*__p_)();
public:
@@ -32,7 +32,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_t : public __unar
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_t : public __binary_function<_Tp*, _Ap, _Sp> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]] mem_fun1_t : public __binary_function<_Tp*, _Ap, _Sp> {
_Sp (_Tp::*__p_)(_Ap);
public:
@@ -41,17 +41,18 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_t : public __bin
};
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 _LIBCPP_HIDE_FROM_ABI 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 _LIBCPP_HIDE_FROM_ABI mem_fun1_t<_Sp, _Tp, _Ap>
+mem_fun(_Sp (_Tp::*__f)(_Ap)) {
return mem_fun1_t<_Sp, _Tp, _Ap>(__f);
}
template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_ref_t : public __unary_function<_Tp, _Sp> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]] mem_fun_ref_t : public __unary_function<_Tp, _Sp> {
_Sp (_Tp::*__p_)();
public:
@@ -60,7 +61,8 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_ref_t : public __
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]]
+mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> {
_Sp (_Tp::*__p_)(_Ap);
public:
@@ -69,18 +71,19 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_ref_t : public _
};
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 _LIBCPP_HIDE_FROM_ABI 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>
+[[__libcpp_deprecated_in_cxx11()]] inline _LIBCPP_HIDE_FROM_ABI mem_fun1_ref_t<_Sp, _Tp, _Ap>
mem_fun_ref(_Sp (_Tp::*__f)(_Ap)) {
return mem_fun1_ref_t<_Sp, _Tp, _Ap>(__f);
}
template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t : public __unary_function<const _Tp*, _Sp> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]]
+const_mem_fun_t : public __unary_function<const _Tp*, _Sp> {
_Sp (_Tp::*__p_)() const;
public:
@@ -89,8 +92,8 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t : public
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t : public __binary_function<const _Tp*, _Ap, _Sp> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]]
+const_mem_fun1_t : public __binary_function<const _Tp*, _Ap, _Sp> {
_Sp (_Tp::*__p_)(_Ap) const;
public:
@@ -99,18 +102,20 @@ _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t : public __binary_function<const _T
};
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 _LIBCPP_HIDE_FROM_ABI 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>
+[[__libcpp_deprecated_in_cxx11()]] inline _LIBCPP_HIDE_FROM_ABI const_mem_fun1_t<_Sp, _Tp, _Ap>
mem_fun(_Sp (_Tp::*__f)(_Ap) const) {
return const_mem_fun1_t<_Sp, _Tp, _Ap>(__f);
}
template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_ref_t : public __unary_function<_Tp, _Sp> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]]
+const_mem_fun_ref_t : public __unary_function<_Tp, _Sp> {
_Sp (_Tp::*__p_)() const;
public:
@@ -119,7 +124,8 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_ref_t : pub
};
template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]]
+const_mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> {
_Sp (_Tp::*__p_)(_Ap) const;
public:
@@ -128,13 +134,13 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t : pu
};
template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI const_mem_fun_ref_t<_Sp, _Tp>
+[[__libcpp_deprecated_in_cxx11()]] inline _LIBCPP_HIDE_FROM_ABI 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>
+[[__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) {
return const_mem_fun1_ref_t<_Sp, _Tp, _Ap>(__f);
}
diff --git a/libcxx/include/__functional/operations.h b/libcxx/include/__functional/operations.h
index 67d9da289aead..c999c2da9f2e5 100644
--- a/libcxx/include/__functional/operations.h
+++ b/libcxx/include/__functional/operations.h
@@ -30,7 +30,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS plus : __binary_function<_Tp, _Tp, _Tp> {
+struct [[__libcpp_template_vis]] 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;
@@ -48,7 +48,7 @@ inline const bool __desugars_to_v<__plus_tag, plus<void>, _Tp, _Up> = true;
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS plus<void> {
+struct [[__libcpp_template_vis]] plus<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))) //
@@ -64,7 +64,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS minus : __binary_function<_Tp, _Tp, _Tp> {
+struct [[__libcpp_template_vis]] 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;
@@ -74,7 +74,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(minus);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS minus<void> {
+struct [[__libcpp_template_vis]] minus<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))) //
@@ -90,7 +90,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS multiplies : __binary_function<_Tp, _Tp, _Tp> {
+struct [[__libcpp_template_vis]] 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;
@@ -100,7 +100,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(multiplies);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS multiplies<void> {
+struct [[__libcpp_template_vis]] multiplies<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))) //
@@ -116,7 +116,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS divides : __binary_function<_Tp, _Tp, _Tp> {
+struct [[__libcpp_template_vis]] 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;
@@ -126,7 +126,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(divides);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS divides<void> {
+struct [[__libcpp_template_vis]] divides<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))) //
@@ -142,7 +142,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS modulus : __binary_function<_Tp, _Tp, _Tp> {
+struct [[__libcpp_template_vis]] 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;
@@ -152,7 +152,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(modulus);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS modulus<void> {
+struct [[__libcpp_template_vis]] modulus<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))) //
@@ -168,7 +168,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS negate : __unary_function<_Tp, _Tp> {
+struct [[__libcpp_template_vis]] 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; }
};
@@ -176,7 +176,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(negate);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS negate<void> {
+struct [[__libcpp_template_vis]] negate<void> {
template <class _Tp>
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI auto operator()(_Tp&& __x) const
noexcept(noexcept(-std::forward<_Tp>(__x))) //
@@ -194,7 +194,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS bit_and : __binary_function<_Tp, _Tp, _Tp> {
+struct [[__libcpp_template_vis]] 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;
@@ -204,7 +204,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_and);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS bit_and<void> {
+struct [[__libcpp_template_vis]] 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) &
@@ -217,13 +217,13 @@ struct _LIBCPP_TEMPLATE_VIS bit_and<void> {
#if _LIBCPP_STD_VER >= 14
template <class _Tp = void>
-struct _LIBCPP_TEMPLATE_VIS bit_not : __unary_function<_Tp, _Tp> {
+struct [[__libcpp_template_vis]] bit_not : __unary_function<_Tp, _Tp> {
_LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI _Tp operator()(const _Tp& __x) const { return ~__x; }
};
_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_not);
template <>
-struct _LIBCPP_TEMPLATE_VIS bit_not<void> {
+struct [[__libcpp_template_vis]] 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))) //
@@ -239,7 +239,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS bit_or : __binary_function<_Tp, _Tp, _Tp> {
+struct [[__libcpp_template_vis]] 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;
@@ -249,7 +249,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_or);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS bit_or<void> {
+struct [[__libcpp_template_vis]] bit_or<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))) //
@@ -265,7 +265,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS bit_xor : __binary_function<_Tp, _Tp, _Tp> {
+struct [[__libcpp_template_vis]] 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;
@@ -275,7 +275,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_xor);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS bit_xor<void> {
+struct [[__libcpp_template_vis]] bit_xor<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))) //
@@ -293,7 +293,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS equal_to : __binary_function<_Tp, _Tp, bool> {
+struct [[__libcpp_template_vis]] 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;
@@ -303,7 +303,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(equal_to);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS equal_to<void> {
+struct [[__libcpp_template_vis]] equal_to<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))) //
@@ -328,7 +328,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS not_equal_to : __binary_function<_Tp, _Tp, bool> {
+struct [[__libcpp_template_vis]] 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;
@@ -338,7 +338,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(not_equal_to);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS not_equal_to<void> {
+struct [[__libcpp_template_vis]] not_equal_to<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))) //
@@ -354,7 +354,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS less : __binary_function<_Tp, _Tp, bool> {
+struct [[__libcpp_template_vis]] 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;
@@ -370,7 +370,7 @@ inline const bool __desugars_to_v<__totally_ordered_less_tag, less<_Tp>, _Tp, _T
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS less<void> {
+struct [[__libcpp_template_vis]] less<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))) //
@@ -392,7 +392,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS less_equal : __binary_function<_Tp, _Tp, bool> {
+struct [[__libcpp_template_vis]] 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;
@@ -402,7 +402,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(less_equal);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS less_equal<void> {
+struct [[__libcpp_template_vis]] less_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))) //
@@ -418,7 +418,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS greater_equal : __binary_function<_Tp, _Tp, bool> {
+struct [[__libcpp_template_vis]] 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;
@@ -428,7 +428,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(greater_equal);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS greater_equal<void> {
+struct [[__libcpp_template_vis]] 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) >=
@@ -444,7 +444,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS greater : __binary_function<_Tp, _Tp, bool> {
+struct [[__libcpp_template_vis]] 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;
@@ -457,7 +457,7 @@ inline const bool __desugars_to_v<__greater_tag, greater<_Tp>, _Tp, _Tp> = true;
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS greater<void> {
+struct [[__libcpp_template_vis]] greater<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))) //
@@ -478,7 +478,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS logical_and : __binary_function<_Tp, _Tp, bool> {
+struct [[__libcpp_template_vis]] 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;
@@ -488,7 +488,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_and);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS logical_and<void> {
+struct [[__libcpp_template_vis]] logical_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))) //
@@ -504,7 +504,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS logical_not : __unary_function<_Tp, bool> {
+struct [[__libcpp_template_vis]] 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; }
};
@@ -512,7 +512,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_not);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS logical_not<void> {
+struct [[__libcpp_template_vis]] 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))) //
@@ -528,7 +528,7 @@ template <class _Tp = void>
#else
template <class _Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS logical_or : __binary_function<_Tp, _Tp, bool> {
+struct [[__libcpp_template_vis]] 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;
@@ -538,7 +538,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(logical_or);
#if _LIBCPP_STD_VER >= 14
template <>
-struct _LIBCPP_TEMPLATE_VIS logical_or<void> {
+struct [[__libcpp_template_vis]] logical_or<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))) //
diff --git a/libcxx/include/__functional/pointer_to_binary_function.h b/libcxx/include/__functional/pointer_to_binary_function.h
index e345250dcdd87..e6bd3972b81a5 100644
--- a/libcxx/include/__functional/pointer_to_binary_function.h
+++ b/libcxx/include/__functional/pointer_to_binary_function.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
template <class _Arg1, class _Arg2, class _Result>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function : public __binary_function<_Arg1, _Arg2, _Result> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]]
+pointer_to_binary_function : public __binary_function<_Arg1, _Arg2, _Result> {
_Result (*__f_)(_Arg1, _Arg2);
public:
@@ -32,7 +32,7 @@ _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function : public __binary_functio
};
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 _LIBCPP_HIDE_FROM_ABI 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 3a5d153d36178..722f95ae3e527 100644
--- a/libcxx/include/__functional/pointer_to_unary_function.h
+++ b/libcxx/include/__functional/pointer_to_unary_function.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
template <class _Arg, class _Result>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function : public __unary_function<_Arg, _Result> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]]
+pointer_to_unary_function : public __unary_function<_Arg, _Result> {
_Result (*__f_)(_Arg);
public:
@@ -32,7 +32,7 @@ _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function : public __unary_function<
};
template <class _Arg, class _Result>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_HIDE_FROM_ABI pointer_to_unary_function<_Arg, _Result>
+[[__libcpp_deprecated_in_cxx11()]] inline _LIBCPP_HIDE_FROM_ABI 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/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h
index d6cd6428f22db..ce6fad5bc4f9b 100644
--- a/libcxx/include/__functional/reference_wrapper.h
+++ b/libcxx/include/__functional/reference_wrapper.h
@@ -30,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp> {
+class [[__libcpp_template_vis]] reference_wrapper : public __weak_result_type<_Tp> {
public:
// types
typedef _Tp type;
diff --git a/libcxx/include/__functional/unary_function.h b/libcxx/include/__functional/unary_function.h
index 769ffc9893a72..84216dbf1005e 100644
--- a/libcxx/include/__functional/unary_function.h
+++ b/libcxx/include/__functional/unary_function.h
@@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
template <class _Arg, class _Result>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 unary_function {
+struct [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]] unary_function {
typedef _Arg argument_type;
typedef _Result result_type;
};
@@ -30,8 +30,8 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 unary_function {
template <class _Arg, class _Result>
struct __unary_function_keep_layout_base {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg;
- using result_type _LIBCPP_DEPRECATED_IN_CXX17 = _Result;
+ using argument_type [[__libcpp_deprecated_in_cxx17()]] = _Arg;
+ using result_type [[__libcpp_deprecated_in_cxx17()]] = _Result;
#endif
};
diff --git a/libcxx/include/__functional/unary_negate.h b/libcxx/include/__functional/unary_negate.h
index 5bd487a97bcb3..32163704828a1 100644
--- a/libcxx/include/__functional/unary_negate.h
+++ b/libcxx/include/__functional/unary_negate.h
@@ -22,8 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
template <class _Predicate>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX17 unary_negate : public __unary_function<typename _Predicate::argument_type, bool> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx17()]]
+unary_negate : public __unary_function<typename _Predicate::argument_type, bool> {
_Predicate __pred_;
public:
@@ -36,7 +36,7 @@ _LIBCPP_DEPRECATED_IN_CXX17 unary_negate : public __unary_function<typename _Pre
};
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 _LIBCPP_HIDE_FROM_ABI unary_negate<_Predicate>
not1(const _Predicate& __pred) {
return unary_negate<_Predicate>(__pred);
}
diff --git a/libcxx/include/__functional/weak_result_type.h b/libcxx/include/__functional/weak_result_type.h
index 233d86009a201..639f8c16fbae2 100644
--- a/libcxx/include/__functional/weak_result_type.h
+++ b/libcxx/include/__functional/weak_result_type.h
@@ -89,7 +89,7 @@ struct __weak_result_type_imp // bool is true
: public __maybe_derive_from_unary_function<_Tp>,
public __maybe_derive_from_binary_function<_Tp> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = typename _Tp::result_type;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = typename _Tp::result_type;
#endif
};
@@ -105,21 +105,21 @@ struct __weak_result_type : public __weak_result_type_imp<_Tp> {};
template <class _Rp>
struct __weak_result_type<_Rp()> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = _Rp;
#endif
};
template <class _Rp>
struct __weak_result_type<_Rp (&)()> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = _Rp;
#endif
};
template <class _Rp>
struct __weak_result_type<_Rp (*)()> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = _Rp;
#endif
};
@@ -175,49 +175,49 @@ struct __weak_result_type<_Rp (_Cp::*)(_A1) const volatile> : public __binary_fu
template <class _Rp, class _A1, class _A2, class _A3, class... _A4>
struct __weak_result_type<_Rp(_A1, _A2, _A3, _A4...)> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = _Rp;
#endif
};
template <class _Rp, class _A1, class _A2, class _A3, class... _A4>
struct __weak_result_type<_Rp (&)(_A1, _A2, _A3, _A4...)> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = _Rp;
#endif
};
template <class _Rp, class _A1, class _A2, class _A3, class... _A4>
struct __weak_result_type<_Rp (*)(_A1, _A2, _A3, _A4...)> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = _Rp;
#endif
};
template <class _Rp, class _Cp, class _A1, class _A2, class... _A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...)> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = _Rp;
#endif
};
template <class _Rp, class _Cp, class _A1, class _A2, class... _A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = _Rp;
#endif
};
template <class _Rp, class _Cp, class _A1, class _A2, class... _A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) volatile> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = _Rp;
#endif
};
template <class _Rp, class _Cp, class _A1, class _A2, class... _A3>
struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const volatile> {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+ using result_type _LIBCPP_NODEBUG [[__libcpp_deprecated_in_cxx17()]] = _Rp;
#endif
};
diff --git a/libcxx/include/__fwd/array.h b/libcxx/include/__fwd/array.h
index 794779ae46ab7..71a65bdcdd105 100644
--- a/libcxx/include/__fwd/array.h
+++ b/libcxx/include/__fwd/array.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS array;
+struct [[__libcpp_template_vis]] array;
template <size_t _Ip, class _Tp, size_t _Size>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& get(array<_Tp, _Size>&) _NOEXCEPT;
diff --git a/libcxx/include/__fwd/complex.h b/libcxx/include/__fwd/complex.h
index 092d2e10b12b5..44b1f033ddd68 100644
--- a/libcxx/include/__fwd/complex.h
+++ b/libcxx/include/__fwd/complex.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS complex;
+class [[__libcpp_template_vis]] complex;
#if _LIBCPP_STD_VER >= 26
diff --git a/libcxx/include/__fwd/deque.h b/libcxx/include/__fwd/deque.h
index fd2fb5bb4b8e9..29c6cc6470ad6 100644
--- a/libcxx/include/__fwd/deque.h
+++ b/libcxx/include/__fwd/deque.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Allocator = allocator<_Tp> >
-class _LIBCPP_TEMPLATE_VIS deque;
+class [[__libcpp_template_vis]] deque;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__fwd/format.h b/libcxx/include/__fwd/format.h
index 815e3e1922c62..f4c59a9d9ccaa 100644
--- a/libcxx/include/__fwd/format.h
+++ b/libcxx/include/__fwd/format.h
@@ -22,14 +22,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <class _Context>
-class _LIBCPP_TEMPLATE_VIS basic_format_arg;
+class [[__libcpp_template_vis]] basic_format_arg;
template <class _OutIt, class _CharT>
requires output_iterator<_OutIt, const _CharT&>
-class _LIBCPP_TEMPLATE_VIS basic_format_context;
+class [[__libcpp_template_vis]] basic_format_context;
template <class _Tp, class _CharT = char>
-struct _LIBCPP_TEMPLATE_VIS formatter;
+struct [[__libcpp_template_vis]] formatter;
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__fwd/fstream.h b/libcxx/include/__fwd/fstream.h
index e6c430dbf75be..f49b312df97cc 100644
--- a/libcxx/include/__fwd/fstream.h
+++ b/libcxx/include/__fwd/fstream.h
@@ -19,13 +19,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_filebuf;
+class [[__libcpp_template_vis]] basic_filebuf;
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_ifstream;
+class [[__libcpp_template_vis]] basic_ifstream;
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_ofstream;
+class [[__libcpp_template_vis]] basic_ofstream;
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_fstream;
+class [[__libcpp_template_vis]] basic_fstream;
using filebuf = basic_filebuf<char>;
using ifstream = basic_ifstream<char>;
diff --git a/libcxx/include/__fwd/functional.h b/libcxx/include/__fwd/functional.h
index 32c9ef33e453b..fbdac9e432173 100644
--- a/libcxx/include/__fwd/functional.h
+++ b/libcxx/include/__fwd/functional.h
@@ -18,10 +18,10 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class>
-struct _LIBCPP_TEMPLATE_VIS hash;
+struct [[__libcpp_template_vis]] hash;
template <class>
-class _LIBCPP_TEMPLATE_VIS reference_wrapper;
+class [[__libcpp_template_vis]] reference_wrapper;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__fwd/ios.h b/libcxx/include/__fwd/ios.h
index bb0c6eb49b52b..d0827cafa0523 100644
--- a/libcxx/include/__fwd/ios.h
+++ b/libcxx/include/__fwd/ios.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
class _LIBCPP_EXPORTED_FROM_ABI ios_base;
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_ios;
+class [[__libcpp_template_vis]] basic_ios;
using ios = basic_ios<char>;
#if _LIBCPP_HAS_WIDE_CHARACTERS
diff --git a/libcxx/include/__fwd/istream.h b/libcxx/include/__fwd/istream.h
index 66a6708544e55..acc3c7d9a54c9 100644
--- a/libcxx/include/__fwd/istream.h
+++ b/libcxx/include/__fwd/istream.h
@@ -19,10 +19,10 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_istream;
+class [[__libcpp_template_vis]] basic_istream;
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_iostream;
+class [[__libcpp_template_vis]] basic_iostream;
using istream = basic_istream<char>;
using iostream = basic_iostream<char>;
diff --git a/libcxx/include/__fwd/memory.h b/libcxx/include/__fwd/memory.h
index 564000997dec6..1e191ed9c52c6 100644
--- a/libcxx/include/__fwd/memory.h
+++ b/libcxx/include/__fwd/memory.h
@@ -18,10 +18,10 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS allocator;
+class [[__libcpp_template_vis]] allocator;
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS shared_ptr;
+class [[__libcpp_template_vis]] shared_ptr;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__fwd/memory_resource.h b/libcxx/include/__fwd/memory_resource.h
index ca9d3770945c8..390fd21739d79 100644
--- a/libcxx/include/__fwd/memory_resource.h
+++ b/libcxx/include/__fwd/memory_resource.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace pmr {
template <class _ValueType>
-class _LIBCPP_AVAILABILITY_PMR _LIBCPP_TEMPLATE_VIS polymorphic_allocator;
+class _LIBCPP_AVAILABILITY_PMR [[__libcpp_template_vis]] polymorphic_allocator;
} // namespace pmr
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__fwd/ostream.h b/libcxx/include/__fwd/ostream.h
index ff5a3612ef877..88d44a3cc1517 100644
--- a/libcxx/include/__fwd/ostream.h
+++ b/libcxx/include/__fwd/ostream.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_ostream;
+class [[__libcpp_template_vis]] basic_ostream;
using ostream = basic_ostream<char>;
diff --git a/libcxx/include/__fwd/pair.h b/libcxx/include/__fwd/pair.h
index b8ba2b7e92324..a9927ae7f4890 100644
--- a/libcxx/include/__fwd/pair.h
+++ b/libcxx/include/__fwd/pair.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class, class>
-struct _LIBCPP_TEMPLATE_VIS pair;
+struct [[__libcpp_template_vis]] pair;
template <size_t _Ip, class _T1, class _T2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, pair<_T1, _T2> >::type&
diff --git a/libcxx/include/__fwd/queue.h b/libcxx/include/__fwd/queue.h
index 50d99ad9c29f4..b8aee060b0a17 100644
--- a/libcxx/include/__fwd/queue.h
+++ b/libcxx/include/__fwd/queue.h
@@ -21,10 +21,10 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Container = deque<_Tp> >
-class _LIBCPP_TEMPLATE_VIS queue;
+class [[__libcpp_template_vis]] queue;
template <class _Tp, class _Container = vector<_Tp>, class _Compare = less<typename _Container::value_type> >
-class _LIBCPP_TEMPLATE_VIS priority_queue;
+class [[__libcpp_template_vis]] priority_queue;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__fwd/sstream.h b/libcxx/include/__fwd/sstream.h
index c176db6e5ada0..79b563d800023 100644
--- a/libcxx/include/__fwd/sstream.h
+++ b/libcxx/include/__fwd/sstream.h
@@ -20,14 +20,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_stringbuf;
+class [[__libcpp_template_vis]] basic_stringbuf;
template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_istringstream;
+class [[__libcpp_template_vis]] basic_istringstream;
template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
+class [[__libcpp_template_vis]] basic_ostringstream;
template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_stringstream;
+class [[__libcpp_template_vis]] basic_stringstream;
using stringbuf = basic_stringbuf<char>;
using istringstream = basic_istringstream<char>;
diff --git a/libcxx/include/__fwd/stack.h b/libcxx/include/__fwd/stack.h
index 7dab6c1a4f4e2..90f03b37293ed 100644
--- a/libcxx/include/__fwd/stack.h
+++ b/libcxx/include/__fwd/stack.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Container = deque<_Tp> >
-class _LIBCPP_TEMPLATE_VIS stack;
+class [[__libcpp_template_vis]] stack;
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__fwd/streambuf.h b/libcxx/include/__fwd/streambuf.h
index aee0ebb3ce0ff..7c7260cf3f248 100644
--- a/libcxx/include/__fwd/streambuf.h
+++ b/libcxx/include/__fwd/streambuf.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_streambuf;
+class [[__libcpp_template_vis]] basic_streambuf;
using streambuf = basic_streambuf<char>;
diff --git a/libcxx/include/__fwd/string.h b/libcxx/include/__fwd/string.h
index 89dec82d6ffcc..7310b0a57a1ed 100644
--- a/libcxx/include/__fwd/string.h
+++ b/libcxx/include/__fwd/string.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS char_traits;
+struct [[__libcpp_template_vis]] char_traits;
template <>
struct char_traits<char>;
@@ -40,7 +40,7 @@ struct char_traits<wchar_t>;
#endif
template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_string;
+class [[__libcpp_template_vis]] basic_string;
using string = basic_string<char>;
diff --git a/libcxx/include/__fwd/string_view.h b/libcxx/include/__fwd/string_view.h
index b848cb7f60f5f..b211785690d1e 100644
--- a/libcxx/include/__fwd/string_view.h
+++ b/libcxx/include/__fwd/string_view.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_string_view;
+class [[__libcpp_template_vis]] basic_string_view;
typedef basic_string_view<char> string_view;
#if _LIBCPP_HAS_CHAR8_T
diff --git a/libcxx/include/__fwd/subrange.h b/libcxx/include/__fwd/subrange.h
index 5b3a07e55348a..ac2b71ab4d296 100644
--- a/libcxx/include/__fwd/subrange.h
+++ b/libcxx/include/__fwd/subrange.h
@@ -28,7 +28,7 @@ enum class subrange_kind : bool { unsized, sized };
template <input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent, subrange_kind _Kind>
requires(_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>)
-class _LIBCPP_TEMPLATE_VIS subrange;
+class [[__libcpp_template_vis]] subrange;
template <size_t _Index, class _Iter, class _Sent, subrange_kind _Kind>
requires((_Index == 0 && copyable<_Iter>) || _Index == 1)
diff --git a/libcxx/include/__fwd/tuple.h b/libcxx/include/__fwd/tuple.h
index 2ed32bc0df4e1..f2abebd994868 100644
--- a/libcxx/include/__fwd/tuple.h
+++ b/libcxx/include/__fwd/tuple.h
@@ -19,15 +19,15 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <size_t, class>
-struct _LIBCPP_TEMPLATE_VIS tuple_element;
+struct [[__libcpp_template_vis]] tuple_element;
#ifndef _LIBCPP_CXX03_LANG
template <class...>
-class _LIBCPP_TEMPLATE_VIS tuple;
+class [[__libcpp_template_vis]] tuple;
template <class>
-struct _LIBCPP_TEMPLATE_VIS tuple_size;
+struct [[__libcpp_template_vis]] tuple_size;
template <size_t _Ip, class... _Tp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type&
diff --git a/libcxx/include/__fwd/variant.h b/libcxx/include/__fwd/variant.h
index 71c792f46a901..03df712cf5cac 100644
--- a/libcxx/include/__fwd/variant.h
+++ b/libcxx/include/__fwd/variant.h
@@ -21,16 +21,16 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 17
template <class... _Types>
-class _LIBCPP_TEMPLATE_VIS variant;
+class [[__libcpp_template_vis]] variant;
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_size;
+struct [[__libcpp_template_vis]] variant_size;
template <class _Tp>
inline constexpr size_t variant_size_v = variant_size<_Tp>::value;
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative;
+struct [[__libcpp_template_vis]] variant_alternative;
template <size_t _Ip, class _Tp>
using variant_alternative_t = typename variant_alternative<_Ip, _Tp>::type;
diff --git a/libcxx/include/__fwd/vector.h b/libcxx/include/__fwd/vector.h
index 6980e40ec9187..a797e2aece2fe 100644
--- a/libcxx/include/__fwd/vector.h
+++ b/libcxx/include/__fwd/vector.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Alloc = allocator<_Tp> >
-class _LIBCPP_TEMPLATE_VIS vector;
+class [[__libcpp_template_vis]] vector;
template <class _Allocator>
class vector<bool, _Allocator>;
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index d7b312f8774fc..5177383f3484e 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -154,17 +154,17 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
class __hash_table;
template <class _NodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_iterator;
+class [[__libcpp_template_vis]] __hash_iterator;
template <class _ConstNodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+class [[__libcpp_template_vis]] __hash_const_iterator;
template <class _NodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_local_iterator;
+class [[__libcpp_template_vis]] __hash_local_iterator;
template <class _ConstNodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+class [[__libcpp_template_vis]] __hash_const_local_iterator;
template <class _HashIterator>
-class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
+class [[__libcpp_template_vis]] __hash_map_iterator;
template <class _HashIterator>
-class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
+class [[__libcpp_template_vis]] __hash_map_const_iterator;
template <class _Tp>
struct __hash_key_value_types {
@@ -273,7 +273,7 @@ struct __make_hash_node_types {
};
template <class _NodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_iterator {
+class [[__libcpp_template_vis]] __hash_iterator {
typedef __hash_node_types<_NodePtr> _NodeTypes;
typedef _NodePtr __node_pointer;
typedef typename _NodeTypes::__next_pointer __next_pointer;
@@ -327,17 +327,17 @@ private:
template <class, class, class, class>
friend class __hash_table;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+ friend class __hash_const_iterator;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
+ friend class __hash_map_iterator;
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ friend class unordered_map;
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+ friend class unordered_multimap;
};
template <class _NodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_const_iterator {
+class [[__libcpp_template_vis]] __hash_const_iterator {
static_assert(!is_const<typename pointer_traits<_NodePtr>::element_type>::value, "");
typedef __hash_node_types<_NodePtr> _NodeTypes;
typedef _NodePtr __node_pointer;
@@ -395,15 +395,15 @@ private:
template <class, class, class, class>
friend class __hash_table;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
+ friend class __hash_map_const_iterator;
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ friend class unordered_map;
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+ friend class unordered_multimap;
};
template <class _NodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_local_iterator {
+class [[__libcpp_template_vis]] __hash_local_iterator {
typedef __hash_node_types<_NodePtr> _NodeTypes;
typedef _NodePtr __node_pointer;
typedef typename _NodeTypes::__next_pointer __next_pointer;
@@ -468,13 +468,13 @@ private:
template <class, class, class, class>
friend class __hash_table;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+ friend class __hash_const_local_iterator;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
+ friend class __hash_map_iterator;
};
template <class _ConstNodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator {
+class [[__libcpp_template_vis]] __hash_const_local_iterator {
typedef __hash_node_types<_ConstNodePtr> _NodeTypes;
typedef _ConstNodePtr __node_pointer;
typedef typename _NodeTypes::__next_pointer __next_pointer;
@@ -553,7 +553,7 @@ private:
template <class, class, class, class>
friend class __hash_table;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
+ friend class __hash_map_const_iterator;
};
template <class _Alloc>
@@ -1021,9 +1021,9 @@ private:
_LIBCPP_HIDE_FROM_ABI __next_pointer __detach() _NOEXCEPT;
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ friend class unordered_map;
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+ friend class unordered_multimap;
};
template <class _Tp, class _Hash, class _Equal, class _Alloc>
diff --git a/libcxx/include/__ios/fpos.h b/libcxx/include/__ios/fpos.h
index 1af1e23ee50da..da3a40f023afa 100644
--- a/libcxx/include/__ios/fpos.h
+++ b/libcxx/include/__ios/fpos.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _StateT>
-class _LIBCPP_TEMPLATE_VIS fpos {
+class [[__libcpp_template_vis]] fpos {
private:
_StateT __st_;
streamoff __off_;
diff --git a/libcxx/include/__iterator/back_insert_iterator.h b/libcxx/include/__iterator/back_insert_iterator.h
index 9a59487533885..c9efe099fc467 100644
--- a/libcxx/include/__iterator/back_insert_iterator.h
+++ b/libcxx/include/__iterator/back_insert_iterator.h
@@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Container>
-class _LIBCPP_TEMPLATE_VIS back_insert_iterator
+class [[__libcpp_template_vis]] back_insert_iterator
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
: public iterator<output_iterator_tag, void, void, void, void>
#endif
diff --git a/libcxx/include/__iterator/front_insert_iterator.h b/libcxx/include/__iterator/front_insert_iterator.h
index 80819cd22ae6c..4cec05bda50c6 100644
--- a/libcxx/include/__iterator/front_insert_iterator.h
+++ b/libcxx/include/__iterator/front_insert_iterator.h
@@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Container>
-class _LIBCPP_TEMPLATE_VIS front_insert_iterator
+class [[__libcpp_template_vis]] front_insert_iterator
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
: public iterator<output_iterator_tag, void, void, void, void>
#endif
diff --git a/libcxx/include/__iterator/insert_iterator.h b/libcxx/include/__iterator/insert_iterator.h
index e0ee0ce035e2a..39e4eb9429dda 100644
--- a/libcxx/include/__iterator/insert_iterator.h
+++ b/libcxx/include/__iterator/insert_iterator.h
@@ -37,7 +37,7 @@ using __insert_iterator_iter_t _LIBCPP_NODEBUG = typename _Container::iterator;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Container>
-class _LIBCPP_TEMPLATE_VIS insert_iterator
+class [[__libcpp_template_vis]] insert_iterator
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
: public iterator<output_iterator_tag, void, void, void, void>
#endif
diff --git a/libcxx/include/__iterator/istream_iterator.h b/libcxx/include/__iterator/istream_iterator.h
index 430fada300960..c4e22d3ff726b 100644
--- a/libcxx/include/__iterator/istream_iterator.h
+++ b/libcxx/include/__iterator/istream_iterator.h
@@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Tp, class _CharT = char, class _Traits = char_traits<_CharT>, class _Distance = ptrdiff_t>
-class _LIBCPP_TEMPLATE_VIS istream_iterator
+class [[__libcpp_template_vis]] istream_iterator
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
: public iterator<input_iterator_tag, _Tp, _Distance, const _Tp*, const _Tp&>
#endif
diff --git a/libcxx/include/__iterator/istreambuf_iterator.h b/libcxx/include/__iterator/istreambuf_iterator.h
index 162873b9559ec..6d962d8fa138c 100644
--- a/libcxx/include/__iterator/istreambuf_iterator.h
+++ b/libcxx/include/__iterator/istreambuf_iterator.h
@@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS istreambuf_iterator
+class [[__libcpp_template_vis]] istreambuf_iterator
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
: public iterator<input_iterator_tag, _CharT, typename _Traits::off_type, _CharT*, _CharT>
#endif
diff --git a/libcxx/include/__iterator/iterator.h b/libcxx/include/__iterator/iterator.h
index 1591655313dde..2aead211ae9e8 100644
--- a/libcxx/include/__iterator/iterator.h
+++ b/libcxx/include/__iterator/iterator.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Category, class _Tp, class _Distance = ptrdiff_t, class _Pointer = _Tp*, class _Reference = _Tp&>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator {
+struct [[__libcpp_template_vis, __libcpp_deprecated_in_cxx17()]] iterator {
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Pointer pointer;
diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h
index db68dd2c377ac..c98cdd211f5fa 100644
--- a/libcxx/include/__iterator/iterator_traits.h
+++ b/libcxx/include/__iterator/iterator_traits.h
@@ -64,15 +64,15 @@ using iter_reference_t = decltype(*std::declval<_Tp&>());
#endif // _LIBCPP_STD_VER >= 20
template <class _Iter>
-struct _LIBCPP_TEMPLATE_VIS iterator_traits;
+struct [[__libcpp_template_vis]] iterator_traits;
-struct _LIBCPP_TEMPLATE_VIS input_iterator_tag {};
-struct _LIBCPP_TEMPLATE_VIS output_iterator_tag {};
-struct _LIBCPP_TEMPLATE_VIS forward_iterator_tag : public input_iterator_tag {};
-struct _LIBCPP_TEMPLATE_VIS bidirectional_iterator_tag : public forward_iterator_tag {};
-struct _LIBCPP_TEMPLATE_VIS random_access_iterator_tag : public bidirectional_iterator_tag {};
+struct [[__libcpp_template_vis]] input_iterator_tag {};
+struct [[__libcpp_template_vis]] output_iterator_tag {};
+struct [[__libcpp_template_vis]] forward_iterator_tag : public input_iterator_tag {};
+struct [[__libcpp_template_vis]] bidirectional_iterator_tag : public forward_iterator_tag {};
+struct [[__libcpp_template_vis]] random_access_iterator_tag : public bidirectional_iterator_tag {};
#if _LIBCPP_STD_VER >= 20
-struct _LIBCPP_TEMPLATE_VIS contiguous_iterator_tag : public random_access_iterator_tag {};
+struct [[__libcpp_template_vis]] contiguous_iterator_tag : public random_access_iterator_tag {};
#endif
template <class _Iter>
@@ -397,7 +397,7 @@ struct __iterator_traits<_Iter, true>
// the client expects instead of failing at compile time.
template <class _Iter>
-struct _LIBCPP_TEMPLATE_VIS iterator_traits : __iterator_traits<_Iter, __has_iterator_typedefs<_Iter>::value> {
+struct [[__libcpp_template_vis]] iterator_traits : __iterator_traits<_Iter, __has_iterator_typedefs<_Iter>::value> {
using __primary_template _LIBCPP_NODEBUG = iterator_traits;
};
#endif // _LIBCPP_STD_VER >= 20
@@ -406,7 +406,7 @@ template <class _Tp>
#if _LIBCPP_STD_VER >= 20
requires is_object_v<_Tp>
#endif
-struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*> {
+struct [[__libcpp_template_vis]] iterator_traits<_Tp*> {
typedef ptrdiff_t difference_type;
typedef __remove_cv_t<_Tp> value_type;
typedef _Tp* pointer;
diff --git a/libcxx/include/__iterator/move_iterator.h b/libcxx/include/__iterator/move_iterator.h
index a1c53e9bd2b59..68dd0bbc64050 100644
--- a/libcxx/include/__iterator/move_iterator.h
+++ b/libcxx/include/__iterator/move_iterator.h
@@ -64,7 +64,7 @@ concept __move_iter_comparable = requires {
#endif // _LIBCPP_STD_VER >= 20
template <class _Iter>
-class _LIBCPP_TEMPLATE_VIS move_iterator
+class [[__libcpp_template_vis]] move_iterator
#if _LIBCPP_STD_VER >= 20
: public __move_iter_category_base<_Iter>
#endif
@@ -116,7 +116,7 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
return *this;
}
- _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pointer operator->() const {
+ [[__libcpp_deprecated_in_cxx20()]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pointer operator->() const {
return __current_;
}
diff --git a/libcxx/include/__iterator/move_sentinel.h b/libcxx/include/__iterator/move_sentinel.h
index 4a2a09ef0611d..c1503a82d468c 100644
--- a/libcxx/include/__iterator/move_sentinel.h
+++ b/libcxx/include/__iterator/move_sentinel.h
@@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
template <semiregular _Sent>
-class _LIBCPP_TEMPLATE_VIS move_sentinel {
+class [[__libcpp_template_vis]] move_sentinel {
public:
_LIBCPP_HIDE_FROM_ABI move_sentinel() = default;
diff --git a/libcxx/include/__iterator/ostream_iterator.h b/libcxx/include/__iterator/ostream_iterator.h
index 93ecc03010d07..216da35954c5d 100644
--- a/libcxx/include/__iterator/ostream_iterator.h
+++ b/libcxx/include/__iterator/ostream_iterator.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Tp, class _CharT = char, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS ostream_iterator
+class [[__libcpp_template_vis]] ostream_iterator
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
: public iterator<output_iterator_tag, void, void, void, void>
#endif
diff --git a/libcxx/include/__iterator/ostreambuf_iterator.h b/libcxx/include/__iterator/ostreambuf_iterator.h
index f00449355e4eb..84ad50e97bc19 100644
--- a/libcxx/include/__iterator/ostreambuf_iterator.h
+++ b/libcxx/include/__iterator/ostreambuf_iterator.h
@@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator
+class [[__libcpp_template_vis]] ostreambuf_iterator
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
: public iterator<output_iterator_tag, void, void, void, void>
#endif
diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h
index 5bd1f868d3ff3..8800fe4a62b52 100644
--- a/libcxx/include/__iterator/reverse_iterator.h
+++ b/libcxx/include/__iterator/reverse_iterator.h
@@ -48,7 +48,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Iter>
-class _LIBCPP_TEMPLATE_VIS reverse_iterator
+class [[__libcpp_template_vis]] reverse_iterator
#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
: public iterator<typename iterator_traits<_Iter>::iterator_category,
typename iterator_traits<_Iter>::value_type,
diff --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h
index 966c4675b7049..3abf84517930a 100644
--- a/libcxx/include/__iterator/wrap_iter.h
+++ b/libcxx/include/__iterator/wrap_iter.h
@@ -112,9 +112,9 @@ class __wrap_iter {
template <class _CharT, class _Traits>
friend class basic_string_view;
template <class _Tp, class _Alloc>
- friend class _LIBCPP_TEMPLATE_VIS vector;
+ friend class vector;
template <class _Tp, size_t>
- friend class _LIBCPP_TEMPLATE_VIS span;
+ friend class span;
template <class _Tp, size_t _Size>
friend struct array;
};
@@ -236,7 +236,7 @@ struct __libcpp_is_contiguous_iterator<__wrap_iter<_It> > : true_type {};
#endif
template <class _It>
-struct _LIBCPP_TEMPLATE_VIS pointer_traits<__wrap_iter<_It> > {
+struct [[__libcpp_template_vis]] pointer_traits<__wrap_iter<_It> > {
typedef __wrap_iter<_It> pointer;
typedef typename pointer_traits<_It>::element_type element_type;
typedef typename pointer_traits<_It>::difference_type difference_type;
diff --git a/libcxx/include/__locale b/libcxx/include/__locale
index 5ae3228989749..f7fb29a4cec80 100644
--- a/libcxx/include/__locale
+++ b/libcxx/include/__locale
@@ -173,7 +173,7 @@ inline _LIBCPP_HIDE_FROM_ABI const _Facet& use_facet(const locale& __l) {
// template <class _CharT> class collate;
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS collate : public locale::facet {
+class [[__libcpp_template_vis]] collate : public locale::facet {
public:
typedef _CharT char_type;
typedef basic_string<char_type> string_type;
@@ -245,7 +245,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>;
// template <class CharT> class collate_byname;
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS collate_byname;
+class [[__libcpp_template_vis]] collate_byname;
template <>
class _LIBCPP_EXPORTED_FROM_ABI collate_byname<char> : public collate<char> {
@@ -449,7 +449,7 @@ public:
};
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS ctype;
+class [[__libcpp_template_vis]] ctype;
#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
@@ -616,7 +616,7 @@ protected:
// template <class CharT> class ctype_byname;
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS ctype_byname;
+class [[__libcpp_template_vis]] ctype_byname;
template <>
class _LIBCPP_EXPORTED_FROM_ABI ctype_byname<char> : public ctype<char> {
@@ -742,7 +742,7 @@ public:
// template <class internT, class externT, class stateT> class codecvt;
template <class _InternT, class _ExternT, class _StateT>
-class _LIBCPP_TEMPLATE_VIS codecvt;
+class [[__libcpp_template_vis]] codecvt;
// template <> class codecvt<char, char, mbstate_t>
@@ -909,7 +909,7 @@ protected:
// template <> class codecvt<char16_t, char, mbstate_t> // deprecated in C++20
template <>
-class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXPORTED_FROM_ABI codecvt<char16_t, char, mbstate_t>
+class [[__libcpp_deprecated_in_cxx20()]] _LIBCPP_EXPORTED_FROM_ABI codecvt<char16_t, char, mbstate_t>
: public locale::facet, public codecvt_base {
public:
typedef char16_t intern_type;
@@ -1072,7 +1072,7 @@ protected:
// template <> class codecvt<char32_t, char, mbstate_t> // deprecated in C++20
template <>
-class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXPORTED_FROM_ABI codecvt<char32_t, char, mbstate_t>
+class [[__libcpp_deprecated_in_cxx20()]] _LIBCPP_EXPORTED_FROM_ABI codecvt<char32_t, char, mbstate_t>
: public locale::facet, public codecvt_base {
public:
typedef char32_t intern_type;
@@ -1235,7 +1235,7 @@ protected:
// template <class _InternT, class _ExternT, class _StateT> class codecvt_byname
template <class _InternT, class _ExternT, class _StateT>
-class _LIBCPP_TEMPLATE_VIS codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> {
+class [[__libcpp_template_vis]] codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> {
public:
_LIBCPP_HIDE_FROM_ABI explicit codecvt_byname(const char* __nm, size_t __refs = 0)
: codecvt<_InternT, _ExternT, _StateT>(__nm, __refs) {}
@@ -1255,9 +1255,9 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char, char
#if _LIBCPP_HAS_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>;
#endif
-extern template class _LIBCPP_DEPRECATED_IN_CXX20
+extern template class __attribute__((__libcpp_deprecated_in_cxx20()))
_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>; // deprecated in C++20
-extern template class _LIBCPP_DEPRECATED_IN_CXX20
+extern template class __attribute__((__libcpp_deprecated_in_cxx20()))
_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>; // deprecated in C++20
#if _LIBCPP_HAS_CHAR8_T
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char8_t, mbstate_t>; // C++20
@@ -1411,7 +1411,7 @@ struct _LIBCPP_EXPORTED_FROM_ABI __widen_from_utf8<32> : public codecvt<char32_t
// template <class charT> class numpunct
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS numpunct;
+class [[__libcpp_template_vis]] numpunct;
template <>
class _LIBCPP_EXPORTED_FROM_ABI numpunct<char> : public locale::facet {
@@ -1476,7 +1476,7 @@ protected:
// template <class charT> class numpunct_byname
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS numpunct_byname;
+class [[__libcpp_template_vis]] numpunct_byname;
template <>
class _LIBCPP_EXPORTED_FROM_ABI numpunct_byname<char> : public numpunct<char> {
diff --git a/libcxx/include/__memory/allocator.h b/libcxx/include/__memory/allocator.h
index 2620f1cafb430..7937f86f481df 100644
--- a/libcxx/include/__memory/allocator.h
+++ b/libcxx/include/__memory/allocator.h
@@ -35,17 +35,17 @@ template <class _Tp>
class allocator;
#if _LIBCPP_STD_VER <= 17
-// These specializations shouldn't be marked _LIBCPP_DEPRECATED_IN_CXX17.
+// These specializations shouldn't be marked [[__libcpp_deprecated_in_cxx17()]].
// Specializing allocator<void> is deprecated, but not using it.
template <>
-class _LIBCPP_TEMPLATE_VIS allocator<void> {
+class [[__libcpp_template_vis]] allocator<void> {
public:
- _LIBCPP_DEPRECATED_IN_CXX17 typedef void* pointer;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef const void* const_pointer;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef void value_type;
+ [[__libcpp_deprecated_in_cxx17()]] typedef void* pointer;
+ [[__libcpp_deprecated_in_cxx17()]] typedef const void* const_pointer;
+ [[__libcpp_deprecated_in_cxx17()]] typedef void value_type;
template <class _Up>
- struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {
+ struct [[__libcpp_deprecated_in_cxx17()]] rebind {
typedef allocator<_Up> other;
};
};
@@ -77,7 +77,7 @@ struct __non_trivial_if<true, _Unique> {
// allocator<void> trivial in C++20.
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS allocator : private __non_trivial_if<!is_void<_Tp>::value, allocator<_Tp> > {
+class [[__libcpp_template_vis]] allocator : private __non_trivial_if<!is_void<_Tp>::value, allocator<_Tp> > {
static_assert(!is_const<_Tp>::value, "std::allocator does not support const types");
static_assert(!is_volatile<_Tp>::value, "std::allocator does not support volatile types");
@@ -87,7 +87,7 @@ class _LIBCPP_TEMPLATE_VIS allocator : private __non_trivial_if<!is_void<_Tp>::v
typedef _Tp value_type;
typedef true_type propagate_on_container_move_assignment;
#if _LIBCPP_STD_VER <= 23 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_ALLOCATOR_MEMBERS)
- _LIBCPP_DEPRECATED_IN_CXX23 typedef true_type is_always_equal;
+ [[__libcpp_deprecated_in_cxx23()]] typedef true_type is_always_equal;
#endif
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 allocator() _NOEXCEPT = default;
@@ -123,37 +123,37 @@ class _LIBCPP_TEMPLATE_VIS allocator : private __non_trivial_if<!is_void<_Tp>::v
// C++20 Removed members
#if _LIBCPP_STD_VER <= 17
- _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp* pointer;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp& reference;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference;
+ [[__libcpp_deprecated_in_cxx17()]] typedef _Tp* pointer;
+ [[__libcpp_deprecated_in_cxx17()]] typedef const _Tp* const_pointer;
+ [[__libcpp_deprecated_in_cxx17()]] typedef _Tp& reference;
+ [[__libcpp_deprecated_in_cxx17()]] typedef const _Tp& const_reference;
template <class _Up>
- struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {
+ struct [[__libcpp_deprecated_in_cxx17()]] rebind {
typedef allocator<_Up> other;
};
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI pointer address(reference __x) const _NOEXCEPT {
+ [[__libcpp_deprecated_in_cxx17()]] _LIBCPP_HIDE_FROM_ABI pointer address(reference __x) const _NOEXCEPT {
return std::addressof(__x);
}
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI const_pointer address(const_reference __x) const _NOEXCEPT {
+ [[__libcpp_deprecated_in_cxx17()]] _LIBCPP_HIDE_FROM_ABI const_pointer address(const_reference __x) const _NOEXCEPT {
return std::addressof(__x);
}
- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX17 _Tp* allocate(size_t __n, const void*) {
+ [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI [[__libcpp_deprecated_in_cxx17()]] _Tp* allocate(size_t __n, const void*) {
return allocate(__n);
}
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT {
+ [[__libcpp_deprecated_in_cxx17()]] _LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT {
return size_type(~0) / sizeof(_Tp);
}
template <class _Up, class... _Args>
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI void construct(_Up* __p, _Args&&... __args) {
+ [[__libcpp_deprecated_in_cxx17()]] _LIBCPP_HIDE_FROM_ABI void construct(_Up* __p, _Args&&... __args) {
::new ((void*)__p) _Up(std::forward<_Args>(__args)...);
}
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI void destroy(pointer __p) { __p->~_Tp(); }
+ [[__libcpp_deprecated_in_cxx17()]] _LIBCPP_HIDE_FROM_ABI void destroy(pointer __p) { __p->~_Tp(); }
#endif
};
diff --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h
index 72a0a9c399bd4..af20df758ad4d 100644
--- a/libcxx/include/__memory/allocator_arg_t.h
+++ b/libcxx/include/__memory/allocator_arg_t.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-struct _LIBCPP_TEMPLATE_VIS allocator_arg_t {
+struct [[__libcpp_template_vis]] allocator_arg_t {
explicit allocator_arg_t() = default;
};
diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h
index 2d9ab847e9f25..5dd88fb805f7b 100644
--- a/libcxx/include/__memory/allocator_traits.h
+++ b/libcxx/include/__memory/allocator_traits.h
@@ -235,7 +235,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(allocation_result);
#endif // _LIBCPP_STD_VER
template <class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS allocator_traits {
+struct [[__libcpp_template_vis]] allocator_traits {
using allocator_type = _Alloc;
using value_type = typename allocator_type::value_type;
using pointer = __pointer<value_type, allocator_type>;
diff --git a/libcxx/include/__memory/auto_ptr.h b/libcxx/include/__memory/auto_ptr.h
index 752143616bb20..bb7fa6dac5d68 100644
--- a/libcxx/include/__memory/auto_ptr.h
+++ b/libcxx/include/__memory/auto_ptr.h
@@ -21,12 +21,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr_ref {
+struct [[__libcpp_deprecated_in_cxx11()]] auto_ptr_ref {
_Tp* __ptr_;
};
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]] auto_ptr {
private:
_Tp* __ptr_;
@@ -80,7 +80,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr {
};
template <>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr<void> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx11()]] auto_ptr<void> {
public:
typedef void element_type;
};
diff --git a/libcxx/include/__memory/inout_ptr.h b/libcxx/include/__memory/inout_ptr.h
index b0e75937927cf..197435bf5e835 100644
--- a/libcxx/include/__memory/inout_ptr.h
+++ b/libcxx/include/__memory/inout_ptr.h
@@ -35,7 +35,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 23
template <class _Smart, class _Pointer, class... _Args>
-class _LIBCPP_TEMPLATE_VIS inout_ptr_t {
+class [[__libcpp_template_vis]] inout_ptr_t {
static_assert(!__is_specialization_v<_Smart, shared_ptr>, "std::shared_ptr<> is not supported with std::inout_ptr.");
public:
diff --git a/libcxx/include/__memory/out_ptr.h b/libcxx/include/__memory/out_ptr.h
index 030a4c3b0ed0b..b01b756b86a7d 100644
--- a/libcxx/include/__memory/out_ptr.h
+++ b/libcxx/include/__memory/out_ptr.h
@@ -34,7 +34,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 23
template <class _Smart, class _Pointer, class... _Args>
-class _LIBCPP_TEMPLATE_VIS out_ptr_t {
+class [[__libcpp_template_vis]] out_ptr_t {
static_assert(!__is_specialization_v<_Smart, shared_ptr> || sizeof...(_Args) > 0,
"Using std::shared_ptr<> without a deleter in std::out_ptr is not supported.");
diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h
index afe3d1bf8a2de..8f9a67b658098 100644
--- a/libcxx/include/__memory/pointer_traits.h
+++ b/libcxx/include/__memory/pointer_traits.h
@@ -146,10 +146,10 @@ struct __pointer_traits_impl<_Ptr, __void_t<typename __pointer_traits_element_ty
};
template <class _Ptr>
-struct _LIBCPP_TEMPLATE_VIS pointer_traits : __pointer_traits_impl<_Ptr> {};
+struct [[__libcpp_template_vis]] pointer_traits : __pointer_traits_impl<_Ptr> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*> {
+struct [[__libcpp_template_vis]] pointer_traits<_Tp*> {
typedef _Tp* pointer;
typedef _Tp element_type;
typedef ptrdiff_t difference_type;
diff --git a/libcxx/include/__memory/raw_storage_iterator.h b/libcxx/include/__memory/raw_storage_iterator.h
index a81d93275f7c4..2fc3b8a1209fe 100644
--- a/libcxx/include/__memory/raw_storage_iterator.h
+++ b/libcxx/include/__memory/raw_storage_iterator.h
@@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _OutputIterator, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 raw_storage_iterator
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx17()]] raw_storage_iterator
# if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
: public iterator<output_iterator_tag, void, void, void, void>
# endif
diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index e1d49c4594866..a8f383bac529e 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -90,7 +90,7 @@ class _LIBCPP_EXPORTED_FROM_ABI bad_weak_ptr : public std::exception {
}
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS weak_ptr;
+class [[__libcpp_template_vis]] weak_ptr;
template <class _Tp, class _Dp, class _Alloc>
class __shared_ptr_pointer : public __shared_weak_count {
@@ -218,7 +218,7 @@ struct __shared_ptr_emplace : __shared_weak_count {
struct __shared_ptr_dummy_rebind_allocator_type;
template <>
-class _LIBCPP_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type> {
+class [[__libcpp_template_vis]] allocator<__shared_ptr_dummy_rebind_allocator_type> {
public:
template <class _Other>
struct rebind {
@@ -227,7 +227,7 @@ class _LIBCPP_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type> {
};
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS enable_shared_from_this;
+class [[__libcpp_template_vis]] enable_shared_from_this;
// http://eel.is/c++draft/util.sharedptr#util.smartptr.shared.general-6
// A pointer type Y* is said to be compatible with a pointer type T*
@@ -304,7 +304,7 @@ using __shared_ptr_nullptr_deleter_ctor_reqs _LIBCPP_NODEBUG =
#endif
template <class _Tp>
-class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr {
+class _LIBCPP_SHARED_PTR_TRIVIAL_ABI [[__libcpp_template_vis]] shared_ptr {
struct __nullptr_sfinae_tag {};
public:
@@ -638,7 +638,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr {
_LIBCPP_HIDE_FROM_ABI long use_count() const _NOEXCEPT { return __cntrl_ ? __cntrl_->use_count() : 0; }
#if _LIBCPP_STD_VER < 20 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_SHARED_PTR_UNIQUE)
- _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI bool unique() const _NOEXCEPT { return use_count() == 1; }
+ [[__libcpp_deprecated_in_cxx17()]] _LIBCPP_HIDE_FROM_ABI bool unique() const _NOEXCEPT { return use_count() == 1; }
#endif
_LIBCPP_HIDE_FROM_ABI explicit operator bool() const _NOEXCEPT { return get() != nullptr; }
@@ -711,9 +711,9 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr {
struct __shared_ptr_default_delete<_Yp[], _Un> : default_delete<_Yp[]> {};
template <class _Up>
- friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
+ friend class shared_ptr;
template <class _Up>
- friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
+ friend class weak_ptr;
};
#if _LIBCPP_STD_VER >= 17
@@ -1202,7 +1202,7 @@ inline _LIBCPP_HIDE_FROM_ABI _Dp* get_deleter(const shared_ptr<_Tp>& __p) _NOEXC
#endif // _LIBCPP_HAS_RTTI
template <class _Tp>
-class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr {
+class _LIBCPP_SHARED_PTR_TRIVIAL_ABI [[__libcpp_template_vis]] weak_ptr {
public:
#if _LIBCPP_STD_VER >= 17
typedef remove_extent_t<_Tp> element_type;
@@ -1263,9 +1263,9 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr {
}
template <class _Up>
- friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
+ friend class weak_ptr;
template <class _Up>
- friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
+ friend class shared_ptr;
};
#if _LIBCPP_STD_VER >= 17
@@ -1383,7 +1383,8 @@ struct owner_less;
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS owner_less<shared_ptr<_Tp> > : __binary_function<shared_ptr<_Tp>, shared_ptr<_Tp>, bool> {
+struct [[__libcpp_template_vis]]
+owner_less<shared_ptr<_Tp> > : __binary_function<shared_ptr<_Tp>, shared_ptr<_Tp>, bool> {
_LIBCPP_HIDE_FROM_ABI bool operator()(shared_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT {
return __x.owner_before(__y);
}
@@ -1396,7 +1397,7 @@ struct _LIBCPP_TEMPLATE_VIS owner_less<shared_ptr<_Tp> > : __binary_function<sha
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS owner_less<weak_ptr<_Tp> > : __binary_function<weak_ptr<_Tp>, weak_ptr<_Tp>, bool> {
+struct [[__libcpp_template_vis]] owner_less<weak_ptr<_Tp> > : __binary_function<weak_ptr<_Tp>, weak_ptr<_Tp>, bool> {
_LIBCPP_HIDE_FROM_ABI bool operator()(weak_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const _NOEXCEPT {
return __x.owner_before(__y);
}
@@ -1410,7 +1411,7 @@ struct _LIBCPP_TEMPLATE_VIS owner_less<weak_ptr<_Tp> > : __binary_function<weak_
#if _LIBCPP_STD_VER >= 17
template <>
-struct _LIBCPP_TEMPLATE_VIS owner_less<void> {
+struct [[__libcpp_template_vis]] owner_less<void> {
template <class _Tp, class _Up>
_LIBCPP_HIDE_FROM_ABI bool operator()(shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const _NOEXCEPT {
return __x.owner_before(__y);
@@ -1432,7 +1433,7 @@ struct _LIBCPP_TEMPLATE_VIS owner_less<void> {
#endif
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS enable_shared_from_this {
+class [[__libcpp_template_vis]] enable_shared_from_this {
mutable weak_ptr<_Tp> __weak_this_;
protected:
@@ -1456,13 +1457,13 @@ class _LIBCPP_TEMPLATE_VIS enable_shared_from_this {
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash;
+struct [[__libcpp_template_vis]] hash;
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash<shared_ptr<_Tp> > {
+struct [[__libcpp_template_vis]] hash<shared_ptr<_Tp> > {
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- _LIBCPP_DEPRECATED_IN_CXX17 typedef shared_ptr<_Tp> argument_type;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t result_type;
+ [[__libcpp_deprecated_in_cxx17()]] typedef shared_ptr<_Tp> argument_type;
+ [[__libcpp_deprecated_in_cxx17()]] typedef size_t result_type;
#endif
_LIBCPP_HIDE_FROM_ABI size_t operator()(const shared_ptr<_Tp>& __ptr) const _NOEXCEPT {
diff --git a/libcxx/include/__memory/temporary_buffer.h b/libcxx/include/__memory/temporary_buffer.h
index d18717f52d1cd..42e713b48313c 100644
--- a/libcxx/include/__memory/temporary_buffer.h
+++ b/libcxx/include/__memory/temporary_buffer.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI _LIBCPP_DEPRECATED_IN_CXX17 pair<_Tp*, ptrdiff_t>
+[[__nodiscard__, __libcpp_deprecated_in_cxx17()]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_NO_CFI pair<_Tp*, ptrdiff_t>
get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT {
__unique_temporary_buffer<_Tp> __unique_buf = std::__allocate_unique_temporary_buffer<_Tp>(__n);
pair<_Tp*, ptrdiff_t> __result(__unique_buf.get(), __unique_buf.get_deleter().__count_);
@@ -33,7 +33,7 @@ get_temporary_buffer(ptrdiff_t __n) _NOEXCEPT {
}
template <class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX17 void return_temporary_buffer(_Tp* __p) _NOEXCEPT {
+[[__libcpp_deprecated_in_cxx17()]] inline _LIBCPP_HIDE_FROM_ABI void return_temporary_buffer(_Tp* __p) _NOEXCEPT {
__unique_temporary_buffer<_Tp> __unique_buf(__p);
(void)__unique_buf;
}
diff --git a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h
index e8ef386f7f9fc..97e83cd99894a 100644
--- a/libcxx/include/__memory/unique_ptr.h
+++ b/libcxx/include/__memory/unique_ptr.h
@@ -62,7 +62,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS default_delete {
+struct [[__libcpp_template_vis]] default_delete {
static_assert(!is_function<_Tp>::value, "default_delete cannot be instantiated for function types");
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR default_delete() _NOEXCEPT = default;
@@ -78,7 +78,7 @@ struct _LIBCPP_TEMPLATE_VIS default_delete {
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS default_delete<_Tp[]> {
+struct [[__libcpp_template_vis]] default_delete<_Tp[]> {
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR default_delete() _NOEXCEPT = default;
template <class _Up, __enable_if_t<is_convertible<_Up (*)[], _Tp (*)[]>::value, int> = 0>
@@ -126,7 +126,7 @@ struct __unique_ptr_deleter_sfinae<_Deleter&> {
#endif
template <class _Tp, class _Dp = default_delete<_Tp> >
-class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
+class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI [[__libcpp_template_vis]] unique_ptr {
public:
typedef _Tp element_type;
typedef _Dp deleter_type;
@@ -393,7 +393,7 @@ struct __unique_ptr_array_bounds_stored {
};
template <class _Tp, class _Dp>
-class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp> {
+class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI [[__libcpp_template_vis]] unique_ptr<_Tp[], _Dp> {
public:
typedef _Tp element_type;
typedef _Dp deleter_type;
@@ -783,18 +783,19 @@ void make_unique_for_overwrite(_Args&&...) = delete;
#endif // _LIBCPP_STD_VER >= 20
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash;
+struct [[__libcpp_template_vis]] hash;
template <class _Tp, class _Dp>
#ifdef _LIBCPP_CXX03_LANG
-struct _LIBCPP_TEMPLATE_VIS hash<unique_ptr<_Tp, _Dp> >
+struct [[__libcpp_template_vis]] hash<unique_ptr<_Tp, _Dp> >
#else
-struct _LIBCPP_TEMPLATE_VIS hash<__enable_hash_helper< unique_ptr<_Tp, _Dp>, typename unique_ptr<_Tp, _Dp>::pointer> >
+struct [[__libcpp_template_vis]]
+hash<__enable_hash_helper< unique_ptr<_Tp, _Dp>, typename unique_ptr<_Tp, _Dp>::pointer> >
#endif
{
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- _LIBCPP_DEPRECATED_IN_CXX17 typedef unique_ptr<_Tp, _Dp> argument_type;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t result_type;
+ [[__libcpp_deprecated_in_cxx17()]] typedef unique_ptr<_Tp, _Dp> argument_type;
+ [[__libcpp_deprecated_in_cxx17()]] typedef size_t result_type;
#endif
_LIBCPP_HIDE_FROM_ABI size_t operator()(const unique_ptr<_Tp, _Dp>& __ptr) const {
diff --git a/libcxx/include/__memory/uses_allocator.h b/libcxx/include/__memory/uses_allocator.h
index 20aa0e6b7f272..a4484aed36d43 100644
--- a/libcxx/include/__memory/uses_allocator.h
+++ b/libcxx/include/__memory/uses_allocator.h
@@ -40,7 +40,7 @@ template <class _Tp, class _Alloc>
struct __uses_allocator<_Tp, _Alloc, false> : public false_type {};
template <class _Tp, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator : public __uses_allocator<_Tp, _Alloc> {};
+struct [[__libcpp_template_vis]] uses_allocator : public __uses_allocator<_Tp, _Alloc> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp, class _Alloc>
diff --git a/libcxx/include/__memory_resource/polymorphic_allocator.h b/libcxx/include/__memory_resource/polymorphic_allocator.h
index 7e7eca5c64fb6..ad04c652bd120 100644
--- a/libcxx/include/__memory_resource/polymorphic_allocator.h
+++ b/libcxx/include/__memory_resource/polymorphic_allocator.h
@@ -41,7 +41,7 @@ template <class _ValueType
= byte
# endif
>
-class _LIBCPP_AVAILABILITY_PMR _LIBCPP_TEMPLATE_VIS polymorphic_allocator {
+class _LIBCPP_AVAILABILITY_PMR [[__libcpp_template_vis]] polymorphic_allocator {
public:
using value_type = _ValueType;
diff --git a/libcxx/include/__mutex/lock_guard.h b/libcxx/include/__mutex/lock_guard.h
index 50765cdd0475e..84fde72bb83f2 100644
--- a/libcxx/include/__mutex/lock_guard.h
+++ b/libcxx/include/__mutex/lock_guard.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Mutex>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) lock_guard {
+class [[__libcpp_template_vis]] _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) lock_guard {
public:
typedef _Mutex mutex_type;
diff --git a/libcxx/include/__mutex/once_flag.h b/libcxx/include/__mutex/once_flag.h
index 08ff54bf99265..3233c7865df4b 100644
--- a/libcxx/include/__mutex/once_flag.h
+++ b/libcxx/include/__mutex/once_flag.h
@@ -30,7 +30,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-struct _LIBCPP_TEMPLATE_VIS once_flag;
+struct [[__libcpp_template_vis]] once_flag;
#ifndef _LIBCPP_CXX03_LANG
@@ -47,7 +47,7 @@ _LIBCPP_HIDE_FROM_ABI void call_once(once_flag&, const _Callable&);
#endif // _LIBCPP_CXX03_LANG
-struct _LIBCPP_TEMPLATE_VIS once_flag {
+struct [[__libcpp_template_vis]] once_flag {
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR once_flag() _NOEXCEPT : __state_(_Unset) {}
once_flag(const once_flag&) = delete;
once_flag& operator=(const once_flag&) = delete;
diff --git a/libcxx/include/__mutex/unique_lock.h b/libcxx/include/__mutex/unique_lock.h
index 84073ef4b5114..cf6fcef9fafc9 100644
--- a/libcxx/include/__mutex/unique_lock.h
+++ b/libcxx/include/__mutex/unique_lock.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Mutex>
-class _LIBCPP_TEMPLATE_VIS unique_lock {
+class [[__libcpp_template_vis]] unique_lock {
public:
typedef _Mutex mutex_type;
diff --git a/libcxx/include/__node_handle b/libcxx/include/__node_handle
index 8f32f2de83391..479d7d4b10288 100644
--- a/libcxx/include/__node_handle
+++ b/libcxx/include/__node_handle
@@ -80,7 +80,7 @@ template <class _NodeType, class _Alloc>
struct __generic_container_node_destructor;
template <class _NodeType, class _Alloc, template <class, class> class _MapOrSetSpecifics>
-class _LIBCPP_TEMPLATE_VIS __basic_node_handle
+class [[__libcpp_template_vis]] __basic_node_handle
: public _MapOrSetSpecifics< _NodeType, __basic_node_handle<_NodeType, _Alloc, _MapOrSetSpecifics>> {
template <class _Tp, class _Compare, class _Allocator>
friend class __tree;
@@ -194,7 +194,7 @@ template <class _NodeType, class _Alloc>
using __map_node_handle _LIBCPP_NODEBUG = __basic_node_handle< _NodeType, _Alloc, __map_node_handle_specifics>;
template <class _Iterator, class _NodeType>
-struct _LIBCPP_TEMPLATE_VIS __insert_return_type {
+struct [[__libcpp_template_vis]] __insert_return_type {
_Iterator position;
bool inserted;
_NodeType node;
diff --git a/libcxx/include/__ostream/basic_ostream.h b/libcxx/include/__ostream/basic_ostream.h
index 12ec3694de93b..102e358d168cd 100644
--- a/libcxx/include/__ostream/basic_ostream.h
+++ b/libcxx/include/__ostream/basic_ostream.h
@@ -41,7 +41,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_ostream : virtual public basic_ios<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_ostream : virtual public basic_ios<_CharT, _Traits> {
public:
// types (inherited from basic_ios (27.5.4)):
typedef _CharT char_type;
@@ -71,7 +71,7 @@ class _LIBCPP_TEMPLATE_VIS basic_ostream : virtual public basic_ios<_CharT, _Tra
public:
// 27.7.2.4 Prefix/suffix:
- class _LIBCPP_TEMPLATE_VIS sentry;
+ class [[__libcpp_template_vis]] sentry;
// 27.7.2.6 Formatted output:
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&)) {
@@ -181,7 +181,7 @@ class _LIBCPP_TEMPLATE_VIS basic_ostream : virtual public basic_ios<_CharT, _Tra
};
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_ostream<_CharT, _Traits>::sentry {
+class [[__libcpp_template_vis]] basic_ostream<_CharT, _Traits>::sentry {
bool __ok_;
basic_ostream<_CharT, _Traits>& __os_;
diff --git a/libcxx/include/__random/bernoulli_distribution.h b/libcxx/include/__random/bernoulli_distribution.h
index 4f33dca132d10..ca4aefec2b442 100644
--- a/libcxx/include/__random/bernoulli_distribution.h
+++ b/libcxx/include/__random/bernoulli_distribution.h
@@ -23,12 +23,12 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-class _LIBCPP_TEMPLATE_VIS bernoulli_distribution {
+class [[__libcpp_template_vis]] bernoulli_distribution {
public:
// types
typedef bool result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
double __p_;
public:
diff --git a/libcxx/include/__random/binomial_distribution.h b/libcxx/include/__random/binomial_distribution.h
index 9538c15e2dc97..50981138fa876 100644
--- a/libcxx/include/__random/binomial_distribution.h
+++ b/libcxx/include/__random/binomial_distribution.h
@@ -25,14 +25,14 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _IntType = int>
-class _LIBCPP_TEMPLATE_VIS binomial_distribution {
+class [[__libcpp_template_vis]] binomial_distribution {
static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
public:
// types
typedef _IntType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __t_;
double __p_;
double __pr_;
diff --git a/libcxx/include/__random/cauchy_distribution.h b/libcxx/include/__random/cauchy_distribution.h
index bd341427a1523..bda2a8e416ad9 100644
--- a/libcxx/include/__random/cauchy_distribution.h
+++ b/libcxx/include/__random/cauchy_distribution.h
@@ -26,7 +26,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS cauchy_distribution {
+class [[__libcpp_template_vis]] cauchy_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -34,7 +34,7 @@ class _LIBCPP_TEMPLATE_VIS cauchy_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __a_;
result_type __b_;
diff --git a/libcxx/include/__random/chi_squared_distribution.h b/libcxx/include/__random/chi_squared_distribution.h
index efa96dcdaafb5..f12d4e3df614a 100644
--- a/libcxx/include/__random/chi_squared_distribution.h
+++ b/libcxx/include/__random/chi_squared_distribution.h
@@ -25,7 +25,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS chi_squared_distribution {
+class [[__libcpp_template_vis]] chi_squared_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -33,7 +33,7 @@ class _LIBCPP_TEMPLATE_VIS chi_squared_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __n_;
public:
diff --git a/libcxx/include/__random/discard_block_engine.h b/libcxx/include/__random/discard_block_engine.h
index 45951245a5340..a4b8ab1a4572d 100644
--- a/libcxx/include/__random/discard_block_engine.h
+++ b/libcxx/include/__random/discard_block_engine.h
@@ -28,7 +28,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Engine, size_t __p, size_t __r>
-class _LIBCPP_TEMPLATE_VIS discard_block_engine {
+class [[__libcpp_template_vis]] discard_block_engine {
_Engine __e_;
int __n_;
diff --git a/libcxx/include/__random/discrete_distribution.h b/libcxx/include/__random/discrete_distribution.h
index 3ce4a495fb0c3..2b460d77f5008 100644
--- a/libcxx/include/__random/discrete_distribution.h
+++ b/libcxx/include/__random/discrete_distribution.h
@@ -28,14 +28,14 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _IntType = int>
-class _LIBCPP_TEMPLATE_VIS discrete_distribution {
+class [[__libcpp_template_vis]] discrete_distribution {
static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
public:
// types
typedef _IntType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
vector<double> __p_;
public:
diff --git a/libcxx/include/__random/exponential_distribution.h b/libcxx/include/__random/exponential_distribution.h
index e0e38841172f9..bebdb9509a423 100644
--- a/libcxx/include/__random/exponential_distribution.h
+++ b/libcxx/include/__random/exponential_distribution.h
@@ -27,7 +27,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS exponential_distribution {
+class [[__libcpp_template_vis]] exponential_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -35,7 +35,7 @@ class _LIBCPP_TEMPLATE_VIS exponential_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __lambda_;
public:
diff --git a/libcxx/include/__random/extreme_value_distribution.h b/libcxx/include/__random/extreme_value_distribution.h
index 5505f93274f5c..ff57f2f3a9afb 100644
--- a/libcxx/include/__random/extreme_value_distribution.h
+++ b/libcxx/include/__random/extreme_value_distribution.h
@@ -26,7 +26,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS extreme_value_distribution {
+class [[__libcpp_template_vis]] extreme_value_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -34,7 +34,7 @@ class _LIBCPP_TEMPLATE_VIS extreme_value_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __a_;
result_type __b_;
diff --git a/libcxx/include/__random/fisher_f_distribution.h b/libcxx/include/__random/fisher_f_distribution.h
index cd170b3af388f..8cd9459e17e58 100644
--- a/libcxx/include/__random/fisher_f_distribution.h
+++ b/libcxx/include/__random/fisher_f_distribution.h
@@ -25,7 +25,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS fisher_f_distribution {
+class [[__libcpp_template_vis]] fisher_f_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -33,7 +33,7 @@ class _LIBCPP_TEMPLATE_VIS fisher_f_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __m_;
result_type __n_;
diff --git a/libcxx/include/__random/gamma_distribution.h b/libcxx/include/__random/gamma_distribution.h
index 986e42c1c7f5b..c1bc843f00cad 100644
--- a/libcxx/include/__random/gamma_distribution.h
+++ b/libcxx/include/__random/gamma_distribution.h
@@ -27,7 +27,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS gamma_distribution {
+class [[__libcpp_template_vis]] gamma_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -35,7 +35,7 @@ class _LIBCPP_TEMPLATE_VIS gamma_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __alpha_;
result_type __beta_;
diff --git a/libcxx/include/__random/geometric_distribution.h b/libcxx/include/__random/geometric_distribution.h
index cecd7e57cfa64..2ff9c45de3e82 100644
--- a/libcxx/include/__random/geometric_distribution.h
+++ b/libcxx/include/__random/geometric_distribution.h
@@ -25,14 +25,14 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _IntType = int>
-class _LIBCPP_TEMPLATE_VIS geometric_distribution {
+class [[__libcpp_template_vis]] geometric_distribution {
static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
public:
// types
typedef _IntType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
double __p_;
public:
diff --git a/libcxx/include/__random/independent_bits_engine.h b/libcxx/include/__random/independent_bits_engine.h
index 20f56e9b57560..9ffdfda3f08cd 100644
--- a/libcxx/include/__random/independent_bits_engine.h
+++ b/libcxx/include/__random/independent_bits_engine.h
@@ -31,7 +31,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Engine, size_t __w, class _UIntType>
-class _LIBCPP_TEMPLATE_VIS independent_bits_engine {
+class [[__libcpp_template_vis]] independent_bits_engine {
template <class _UInt, _UInt _R0, size_t _Wp, size_t _Mp>
class __get_n {
static _LIBCPP_CONSTEXPR const size_t _Dt = numeric_limits<_UInt>::digits;
diff --git a/libcxx/include/__random/linear_congruential_engine.h b/libcxx/include/__random/linear_congruential_engine.h
index a6e63839d3fc1..6c3b9ca189251 100644
--- a/libcxx/include/__random/linear_congruential_engine.h
+++ b/libcxx/include/__random/linear_congruential_engine.h
@@ -220,7 +220,7 @@ struct __lce_ta<__a, __c, __m, (unsigned short)(-1), __mode> {
};
template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-class _LIBCPP_TEMPLATE_VIS linear_congruential_engine;
+class [[__libcpp_template_vis]] linear_congruential_engine;
template <class _CharT, class _Traits, class _Up, _Up _Ap, _Up _Cp, _Up _Np>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
@@ -231,7 +231,7 @@ _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, linear_congruential_engine<_Up, _Ap, _Cp, _Np>& __x);
template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-class _LIBCPP_TEMPLATE_VIS linear_congruential_engine {
+class [[__libcpp_template_vis]] linear_congruential_engine {
public:
// types
typedef _UIntType result_type;
diff --git a/libcxx/include/__random/lognormal_distribution.h b/libcxx/include/__random/lognormal_distribution.h
index d8724f8bc5cec..6d0a189f81007 100644
--- a/libcxx/include/__random/lognormal_distribution.h
+++ b/libcxx/include/__random/lognormal_distribution.h
@@ -26,7 +26,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS lognormal_distribution {
+class [[__libcpp_template_vis]] lognormal_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -34,7 +34,7 @@ class _LIBCPP_TEMPLATE_VIS lognormal_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __m_;
result_type __s_;
diff --git a/libcxx/include/__random/mersenne_twister_engine.h b/libcxx/include/__random/mersenne_twister_engine.h
index a23feffff0c89..8c21db4be1cdc 100644
--- a/libcxx/include/__random/mersenne_twister_engine.h
+++ b/libcxx/include/__random/mersenne_twister_engine.h
@@ -42,7 +42,7 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine;
+class [[__libcpp_template_vis]] mersenne_twister_engine;
template <class _UInt,
size_t _Wp,
@@ -134,7 +134,7 @@ template <class _UIntType,
_UIntType __c,
size_t __l,
_UIntType __f>
-class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine {
+class [[__libcpp_template_vis]] mersenne_twister_engine {
public:
// types
typedef _UIntType result_type;
diff --git a/libcxx/include/__random/negative_binomial_distribution.h b/libcxx/include/__random/negative_binomial_distribution.h
index 6d0055d01ed43..e130172a21607 100644
--- a/libcxx/include/__random/negative_binomial_distribution.h
+++ b/libcxx/include/__random/negative_binomial_distribution.h
@@ -28,14 +28,14 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _IntType = int>
-class _LIBCPP_TEMPLATE_VIS negative_binomial_distribution {
+class [[__libcpp_template_vis]] negative_binomial_distribution {
static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
public:
// types
typedef _IntType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __k_;
double __p_;
diff --git a/libcxx/include/__random/normal_distribution.h b/libcxx/include/__random/normal_distribution.h
index 889f189e4161b..626ab42a5d57a 100644
--- a/libcxx/include/__random/normal_distribution.h
+++ b/libcxx/include/__random/normal_distribution.h
@@ -26,7 +26,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS normal_distribution {
+class [[__libcpp_template_vis]] normal_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -34,7 +34,7 @@ class _LIBCPP_TEMPLATE_VIS normal_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __mean_;
result_type __stddev_;
diff --git a/libcxx/include/__random/piecewise_constant_distribution.h b/libcxx/include/__random/piecewise_constant_distribution.h
index 5afe2ebeda3bb..b229388cbd211 100644
--- a/libcxx/include/__random/piecewise_constant_distribution.h
+++ b/libcxx/include/__random/piecewise_constant_distribution.h
@@ -29,7 +29,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS piecewise_constant_distribution {
+class [[__libcpp_template_vis]] piecewise_constant_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -37,7 +37,7 @@ class _LIBCPP_TEMPLATE_VIS piecewise_constant_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
vector<result_type> __b_;
vector<result_type> __densities_;
vector<result_type> __areas_;
diff --git a/libcxx/include/__random/piecewise_linear_distribution.h b/libcxx/include/__random/piecewise_linear_distribution.h
index 0d14f882cbbb2..e602eea66f861 100644
--- a/libcxx/include/__random/piecewise_linear_distribution.h
+++ b/libcxx/include/__random/piecewise_linear_distribution.h
@@ -30,7 +30,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS piecewise_linear_distribution {
+class [[__libcpp_template_vis]] piecewise_linear_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -38,7 +38,7 @@ class _LIBCPP_TEMPLATE_VIS piecewise_linear_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
vector<result_type> __b_;
vector<result_type> __densities_;
vector<result_type> __areas_;
diff --git a/libcxx/include/__random/poisson_distribution.h b/libcxx/include/__random/poisson_distribution.h
index 61a092ef9dd4d..465845c35696b 100644
--- a/libcxx/include/__random/poisson_distribution.h
+++ b/libcxx/include/__random/poisson_distribution.h
@@ -29,14 +29,14 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _IntType = int>
-class _LIBCPP_TEMPLATE_VIS poisson_distribution {
+class [[__libcpp_template_vis]] poisson_distribution {
static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
public:
// types
typedef _IntType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
double __mean_;
double __s_;
double __d_;
diff --git a/libcxx/include/__random/seed_seq.h b/libcxx/include/__random/seed_seq.h
index 3f60069a916db..287a5c4ce1eb5 100644
--- a/libcxx/include/__random/seed_seq.h
+++ b/libcxx/include/__random/seed_seq.h
@@ -30,7 +30,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-class _LIBCPP_TEMPLATE_VIS seed_seq {
+class [[__libcpp_template_vis]] seed_seq {
public:
// types
typedef uint32_t result_type;
diff --git a/libcxx/include/__random/shuffle_order_engine.h b/libcxx/include/__random/shuffle_order_engine.h
index 11a46689a0fa6..1c3a47409b703 100644
--- a/libcxx/include/__random/shuffle_order_engine.h
+++ b/libcxx/include/__random/shuffle_order_engine.h
@@ -52,7 +52,7 @@ class __uratio {
};
template <class _Engine, size_t __k>
-class _LIBCPP_TEMPLATE_VIS shuffle_order_engine {
+class [[__libcpp_template_vis]] shuffle_order_engine {
static_assert(0 < __k, "shuffle_order_engine invalid parameters");
public:
diff --git a/libcxx/include/__random/student_t_distribution.h b/libcxx/include/__random/student_t_distribution.h
index 110a856ee6586..0eb1c65987d92 100644
--- a/libcxx/include/__random/student_t_distribution.h
+++ b/libcxx/include/__random/student_t_distribution.h
@@ -27,7 +27,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS student_t_distribution {
+class [[__libcpp_template_vis]] student_t_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -35,7 +35,7 @@ class _LIBCPP_TEMPLATE_VIS student_t_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __n_;
public:
diff --git a/libcxx/include/__random/subtract_with_carry_engine.h b/libcxx/include/__random/subtract_with_carry_engine.h
index 40dfaf4016ada..42dbfe6f56243 100644
--- a/libcxx/include/__random/subtract_with_carry_engine.h
+++ b/libcxx/include/__random/subtract_with_carry_engine.h
@@ -30,7 +30,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _UIntType, size_t __w, size_t __s, size_t __r>
-class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine;
+class [[__libcpp_template_vis]] subtract_with_carry_engine;
template <class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
_LIBCPP_HIDE_FROM_ABI bool operator==(const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x,
@@ -49,7 +49,7 @@ _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x);
template <class _UIntType, size_t __w, size_t __s, size_t __r>
-class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine {
+class [[__libcpp_template_vis]] subtract_with_carry_engine {
public:
// types
typedef _UIntType result_type;
diff --git a/libcxx/include/__random/uniform_real_distribution.h b/libcxx/include/__random/uniform_real_distribution.h
index 250cb8bab58cf..95427b773e734 100644
--- a/libcxx/include/__random/uniform_real_distribution.h
+++ b/libcxx/include/__random/uniform_real_distribution.h
@@ -25,7 +25,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS uniform_real_distribution {
+class [[__libcpp_template_vis]] uniform_real_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -33,7 +33,7 @@ class _LIBCPP_TEMPLATE_VIS uniform_real_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __a_;
result_type __b_;
diff --git a/libcxx/include/__random/weibull_distribution.h b/libcxx/include/__random/weibull_distribution.h
index aa3d63c8e8663..328aa7a65b61a 100644
--- a/libcxx/include/__random/weibull_distribution.h
+++ b/libcxx/include/__random/weibull_distribution.h
@@ -26,7 +26,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS weibull_distribution {
+class [[__libcpp_template_vis]] weibull_distribution {
static_assert(__libcpp_random_is_valid_realtype<_RealType>::value,
"RealType must be a supported floating-point type");
@@ -34,7 +34,7 @@ class _LIBCPP_TEMPLATE_VIS weibull_distribution {
// types
typedef _RealType result_type;
- class _LIBCPP_TEMPLATE_VIS param_type {
+ class [[__libcpp_template_vis]] param_type {
result_type __a_;
result_type __b_;
diff --git a/libcxx/include/__ranges/non_propagating_cache.h b/libcxx/include/__ranges/non_propagating_cache.h
index b2de2d2ae1cb5..b16cdb570fff8 100644
--- a/libcxx/include/__ranges/non_propagating_cache.h
+++ b/libcxx/include/__ranges/non_propagating_cache.h
@@ -36,7 +36,7 @@ namespace ranges {
// may refer to internal details of the source view.
template <class _Tp>
requires is_object_v<_Tp>
-class _LIBCPP_TEMPLATE_VIS __non_propagating_cache {
+class [[__libcpp_template_vis]] __non_propagating_cache {
struct __from_tag {};
struct __forward_tag {};
diff --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h
index 2d006d3570a79..1c3a92f2e04e9 100644
--- a/libcxx/include/__ranges/subrange.h
+++ b/libcxx/include/__ranges/subrange.h
@@ -72,7 +72,7 @@ template <input_or_output_iterator _Iter,
sentinel_for<_Iter> _Sent = _Iter,
subrange_kind _Kind = sized_sentinel_for<_Sent, _Iter> ? subrange_kind::sized : subrange_kind::unsized>
requires(_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>)
-class _LIBCPP_TEMPLATE_VIS subrange : public view_interface<subrange<_Iter, _Sent, _Kind>> {
+class [[__libcpp_template_vis]] subrange : public view_interface<subrange<_Iter, _Sent, _Kind>> {
public:
// Note: this is an internal implementation detail that is public only for internal usage.
static constexpr bool _StoreSize = (_Kind == subrange_kind::sized && !sized_sentinel_for<_Sent, _Iter>);
diff --git a/libcxx/include/__string/char_traits.h b/libcxx/include/__string/char_traits.h
index 9574cde642e0e..b9e80555e4134 100644
--- a/libcxx/include/__string/char_traits.h
+++ b/libcxx/include/__string/char_traits.h
@@ -78,7 +78,7 @@ exposition-only to document what members a char_traits specialization should pro
// char_traits<char>
template <>
-struct _LIBCPP_TEMPLATE_VIS char_traits<char> {
+struct [[__libcpp_template_vis]] char_traits<char> {
using char_type = char;
using int_type = int;
using off_type = streamoff;
@@ -236,7 +236,7 @@ struct __char_traits_base {
#if _LIBCPP_HAS_WIDE_CHARACTERS
template <>
-struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t> : __char_traits_base<wchar_t, wint_t, static_cast<wint_t>(WEOF)> {
+struct [[__libcpp_template_vis]] char_traits<wchar_t> : __char_traits_base<wchar_t, wint_t, static_cast<wint_t>(WEOF)> {
static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 int
compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
if (__n == 0)
@@ -260,7 +260,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t> : __char_traits_base<wchar_t, w
#if _LIBCPP_HAS_CHAR8_T
template <>
-struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
+struct [[__libcpp_template_vis]] char_traits<char8_t>
: __char_traits_base<char8_t, unsigned int, static_cast<unsigned int>(EOF)> {
static _LIBCPP_HIDE_FROM_ABI constexpr int
compare(const char_type* __s1, const char_type* __s2, size_t __n) noexcept {
@@ -280,7 +280,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
#endif // _LIBCPP_HAS_CHAR8_T
template <>
-struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
+struct [[__libcpp_template_vis]] char_traits<char16_t>
: __char_traits_base<char16_t, uint_least16_t, static_cast<uint_least16_t>(0xFFFF)> {
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 int
compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
@@ -315,7 +315,7 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX17 size_t char_traits<char16_t>::length(const
}
template <>
-struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
+struct [[__libcpp_template_vis]] char_traits<char32_t>
: __char_traits_base<char32_t, uint_least32_t, static_cast<uint_least32_t>(0xFFFFFFFF)> {
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX17 int
compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
diff --git a/libcxx/include/__system_error/errc.h b/libcxx/include/__system_error/errc.h
index 23c84d95b62aa..2b4c0679ea4d6 100644
--- a/libcxx/include/__system_error/errc.h
+++ b/libcxx/include/__system_error/errc.h
@@ -182,7 +182,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc){
no_link = ENOLINK,
no_lock_available = ENOLCK,
// clang-format off
- no_message_available _LIBCPP_DEPRECATED =
+ no_message_available [[__libcpp_deprecated()]] =
_LIBCPP_SUPPRESS_DEPRECATED_ERRC_PUSH
#ifdef ENODATA
ENODATA
@@ -196,7 +196,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc){
no_protocol_option = ENOPROTOOPT,
no_space_on_device = ENOSPC,
// clang-format off
- no_stream_resources _LIBCPP_DEPRECATED =
+ no_stream_resources [[__libcpp_deprecated()]] =
_LIBCPP_SUPPRESS_DEPRECATED_ERRC_PUSH
#ifdef ENOSR
ENOSR
@@ -213,7 +213,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc){
not_a_directory = ENOTDIR,
not_a_socket = ENOTSOCK,
// clang-format off
- not_a_stream _LIBCPP_DEPRECATED =
+ not_a_stream [[__libcpp_deprecated()]] =
_LIBCPP_SUPPRESS_DEPRECATED_ERRC_PUSH
#ifdef ENOSTR
ENOSTR
@@ -241,7 +241,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc){
result_out_of_range = ERANGE,
state_not_recoverable = ENOTRECOVERABLE,
// clang-format off
- stream_timeout _LIBCPP_DEPRECATED =
+ stream_timeout [[__libcpp_deprecated()]] =
_LIBCPP_SUPPRESS_DEPRECATED_ERRC_PUSH
#ifdef ETIME
ETIME
diff --git a/libcxx/include/__system_error/error_code.h b/libcxx/include/__system_error/error_code.h
index 6fa673b4ff713..ab7df08662b0d 100644
--- a/libcxx/include/__system_error/error_code.h
+++ b/libcxx/include/__system_error/error_code.h
@@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public false_type {};
+struct [[__libcpp_template_vis]] is_error_code_enum : public false_type {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -131,7 +131,7 @@ inline _LIBCPP_HIDE_FROM_ABI strong_ordering operator<=>(const error_code& __x,
#endif // _LIBCPP_STD_VER <= 17
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<error_code> : public __unary_function<error_code, size_t> {
+struct [[__libcpp_template_vis]] hash<error_code> : public __unary_function<error_code, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(const error_code& __ec) const _NOEXCEPT {
return static_cast<size_t>(__ec.value());
}
diff --git a/libcxx/include/__system_error/error_condition.h b/libcxx/include/__system_error/error_condition.h
index bfee6528c3f1d..e659ec59b5c54 100644
--- a/libcxx/include/__system_error/error_condition.h
+++ b/libcxx/include/__system_error/error_condition.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum : public false_type {};
+struct [[__libcpp_template_vis]] is_error_condition_enum : public false_type {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -33,11 +33,11 @@ inline constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Tp>::
#endif
template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc> : true_type {};
+struct [[__libcpp_template_vis]] is_error_condition_enum<errc> : true_type {};
#ifdef _LIBCPP_CXX03_LANG
template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc::__lx> : true_type {};
+struct [[__libcpp_template_vis]] is_error_condition_enum<errc::__lx> : true_type {};
#endif
namespace __adl_only {
@@ -118,7 +118,7 @@ operator<=>(const error_condition& __x, const error_condition& __y) noexcept {
#endif // _LIBCPP_STD_VER <= 17
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<error_condition> : public __unary_function<error_condition, size_t> {
+struct [[__libcpp_template_vis]] hash<error_condition> : public __unary_function<error_condition, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(const error_condition& __ec) const _NOEXCEPT {
return static_cast<size_t>(__ec.value());
}
diff --git a/libcxx/include/__thread/formatter.h b/libcxx/include/__thread/formatter.h
index dacf4cec44eaf..b8d08763bc3bb 100644
--- a/libcxx/include/__thread/formatter.h
+++ b/libcxx/include/__thread/formatter.h
@@ -34,7 +34,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
# if _LIBCPP_HAS_THREADS
template <__fmt_char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS formatter<__thread_id, _CharT> {
+struct [[__libcpp_template_vis]] formatter<__thread_id, _CharT> {
public:
template <class _ParseContext>
_LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) {
diff --git a/libcxx/include/__thread/id.h b/libcxx/include/__thread/id.h
index 75c3b3436df7a..59c22b00f4695 100644
--- a/libcxx/include/__thread/id.h
+++ b/libcxx/include/__thread/id.h
@@ -34,7 +34,7 @@ _LIBCPP_HIDE_FROM_ABI __thread_id get_id() _NOEXCEPT;
template <>
struct hash<__thread_id>;
-class _LIBCPP_TEMPLATE_VIS __thread_id {
+class [[__libcpp_template_vis]] __thread_id {
// FIXME: pthread_t is a pointer on Darwin but a long on Linux.
// NULL is the no-thread value on Darwin. Someone needs to check
// on other platforms. We assume 0 works everywhere for now.
@@ -72,7 +72,7 @@ class _LIBCPP_TEMPLATE_VIS __thread_id {
friend __thread_id this_thread::get_id() _NOEXCEPT;
friend class _LIBCPP_EXPORTED_FROM_ABI thread;
- friend struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>;
+ friend struct hash<__thread_id>;
};
inline _LIBCPP_HIDE_FROM_ABI bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT {
diff --git a/libcxx/include/__thread/thread.h b/libcxx/include/__thread/thread.h
index 5e22013dec49f..2f2bfff10fca2 100644
--- a/libcxx/include/__thread/thread.h
+++ b/libcxx/include/__thread/thread.h
@@ -119,7 +119,7 @@ void __thread_specific_ptr<_Tp>::set_pointer(pointer __p) {
}
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<__thread_id> : public __unary_function<__thread_id, size_t> {
+struct [[__libcpp_template_vis]] hash<__thread_id> : public __unary_function<__thread_id, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(__thread_id __v) const _NOEXCEPT {
return hash<__libcpp_thread_id>()(__v.__id_);
}
diff --git a/libcxx/include/__tree b/libcxx/include/__tree
index c627641d5d86f..e6755a20fe269 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -49,20 +49,20 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class, class, class, class>
-class _LIBCPP_TEMPLATE_VIS map;
+class [[__libcpp_template_vis]] map;
template <class, class, class, class>
-class _LIBCPP_TEMPLATE_VIS multimap;
+class [[__libcpp_template_vis]] multimap;
template <class, class, class>
-class _LIBCPP_TEMPLATE_VIS set;
+class [[__libcpp_template_vis]] set;
template <class, class, class>
-class _LIBCPP_TEMPLATE_VIS multiset;
+class [[__libcpp_template_vis]] multiset;
template <class _Tp, class _Compare, class _Allocator>
class __tree;
template <class _Tp, class _NodePtr, class _DiffType>
-class _LIBCPP_TEMPLATE_VIS __tree_iterator;
+class [[__libcpp_template_vis]] __tree_iterator;
template <class _Tp, class _ConstNodePtr, class _DiffType>
-class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
+class [[__libcpp_template_vis]] __tree_const_iterator;
template <class _Pointer>
class __tree_end_node;
@@ -77,9 +77,9 @@ struct __value_type;
template <class _Allocator>
class __map_node_destructor;
template <class _TreeIterator>
-class _LIBCPP_TEMPLATE_VIS __map_iterator;
+class [[__libcpp_template_vis]] __map_iterator;
template <class _TreeIterator>
-class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
+class [[__libcpp_template_vis]] __map_const_iterator;
/*
@@ -714,7 +714,7 @@ struct __generic_container_node_destructor<__tree_node<_Tp, _VoidPtr>, _Alloc> :
#endif
template <class _Tp, class _NodePtr, class _DiffType>
-class _LIBCPP_TEMPLATE_VIS __tree_iterator {
+class [[__libcpp_template_vis]] __tree_iterator {
typedef __tree_node_types<_NodePtr> _NodeTypes;
typedef _NodePtr __node_pointer;
typedef typename _NodeTypes::__node_base_pointer __node_base_pointer;
@@ -777,21 +777,21 @@ private:
template <class, class, class>
friend class __tree;
template <class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
+ friend class __tree_const_iterator;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __map_iterator;
+ friend class __map_iterator;
template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS map;
+ friend class map;
template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS multimap;
+ friend class multimap;
template <class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS set;
+ friend class set;
template <class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS multiset;
+ friend class multiset;
};
template <class _Tp, class _NodePtr, class _DiffType>
-class _LIBCPP_TEMPLATE_VIS __tree_const_iterator {
+class [[__libcpp_template_vis]] __tree_const_iterator {
typedef __tree_node_types<_NodePtr> _NodeTypes;
typedef typename _NodeTypes::__node_pointer __node_pointer;
typedef typename _NodeTypes::__node_base_pointer __node_base_pointer;
@@ -863,15 +863,15 @@ private:
template <class, class, class>
friend class __tree;
template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS map;
+ friend class map;
template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS multimap;
+ friend class multimap;
template <class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS set;
+ friend class set;
template <class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS multiset;
+ friend class multiset;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
+ friend class __map_const_iterator;
};
template <class _Tp, class _Compare>
@@ -1320,9 +1320,9 @@ private:
};
template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS map;
+ friend class map;
template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS multimap;
+ friend class multimap;
};
template <class _Tp, class _Compare, class _Allocator>
diff --git a/libcxx/include/__tuple/sfinae_helpers.h b/libcxx/include/__tuple/sfinae_helpers.h
index 4084e8bb31fd8..163d4dea46c43 100644
--- a/libcxx/include/__tuple/sfinae_helpers.h
+++ b/libcxx/include/__tuple/sfinae_helpers.h
@@ -58,7 +58,7 @@ struct __tuple_constructible<_Tp, _Up, true, true>
typename __make_tuple_types<_Up>::type > {};
template <size_t _Ip, class... _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> > {
+struct [[__libcpp_template_vis]] tuple_element<_Ip, tuple<_Tp...> > {
using type _LIBCPP_NODEBUG = typename tuple_element<_Ip, __tuple_types<_Tp...> >::type;
};
diff --git a/libcxx/include/__tuple/tuple_element.h b/libcxx/include/__tuple/tuple_element.h
index 39be847c8e067..a8889cde5c45b 100644
--- a/libcxx/include/__tuple/tuple_element.h
+++ b/libcxx/include/__tuple/tuple_element.h
@@ -21,27 +21,27 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element;
+struct [[__libcpp_template_vis]] tuple_element;
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp> {
+struct [[__libcpp_template_vis]] tuple_element<_Ip, const _Tp> {
using type _LIBCPP_NODEBUG = const typename tuple_element<_Ip, _Tp>::type;
};
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp> {
+struct [[__libcpp_template_vis]] tuple_element<_Ip, volatile _Tp> {
using type _LIBCPP_NODEBUG = volatile typename tuple_element<_Ip, _Tp>::type;
};
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp> {
+struct [[__libcpp_template_vis]] tuple_element<_Ip, const volatile _Tp> {
using type _LIBCPP_NODEBUG = const volatile typename tuple_element<_Ip, _Tp>::type;
};
#ifndef _LIBCPP_CXX03_LANG
template <size_t _Ip, class... _Types>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> > {
+struct [[__libcpp_template_vis]] tuple_element<_Ip, __tuple_types<_Types...> > {
static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range");
using type _LIBCPP_NODEBUG = __type_pack_element<_Ip, _Types...>;
};
diff --git a/libcxx/include/__tuple/tuple_size.h b/libcxx/include/__tuple/tuple_size.h
index 27d57eb56ba6b..bee3a9363e5a0 100644
--- a/libcxx/include/__tuple/tuple_size.h
+++ b/libcxx/include/__tuple/tuple_size.h
@@ -25,45 +25,48 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size;
+struct [[__libcpp_template_vis]] tuple_size;
#if !defined(_LIBCPP_CXX03_LANG)
template <class _Tp, class...>
using __enable_if_tuple_size_imp _LIBCPP_NODEBUG = _Tp;
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< const _Tp,
- __enable_if_t<!is_volatile<_Tp>::value>,
- integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+struct [[__libcpp_template_vis]]
+tuple_size<__enable_if_tuple_size_imp< const _Tp,
+ __enable_if_t<!is_volatile<_Tp>::value>,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< volatile _Tp,
- __enable_if_t<!is_const<_Tp>::value>,
- integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
+struct [[__libcpp_template_vis]]
+tuple_size<__enable_if_tuple_size_imp< volatile _Tp,
+ __enable_if_t<!is_const<_Tp>::value>,
+ integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS
+struct [[__libcpp_template_vis]]
tuple_size<__enable_if_tuple_size_imp<const volatile _Tp, integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
: public integral_constant<size_t, tuple_size<_Tp>::value> {};
#else
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<const _Tp> : public tuple_size<_Tp> {};
+struct [[__libcpp_template_vis]] tuple_size<const _Tp> : public tuple_size<_Tp> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<volatile _Tp> : public tuple_size<_Tp> {};
+struct [[__libcpp_template_vis]] tuple_size<volatile _Tp> : public tuple_size<_Tp> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
+struct [[__libcpp_template_vis]] tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
#endif
#ifndef _LIBCPP_CXX03_LANG
template <class... _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<tuple<_Tp...> > : public integral_constant<size_t, sizeof...(_Tp)> {};
+struct [[__libcpp_template_vis]] tuple_size<tuple<_Tp...> > : public integral_constant<size_t, sizeof...(_Tp)> {};
template <class... _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__tuple_types<_Tp...> > : public integral_constant<size_t, sizeof...(_Tp)> {};
+struct [[__libcpp_template_vis]] tuple_size<__tuple_types<_Tp...> > : public integral_constant<size_t, sizeof...(_Tp)> {
+};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/add_cv_quals.h b/libcxx/include/__type_traits/add_cv_quals.h
index 3fbc8d935d26c..713adb6f77e89 100644
--- a/libcxx/include/__type_traits/add_cv_quals.h
+++ b/libcxx/include/__type_traits/add_cv_quals.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS add_const {
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS add_const {
using type _LIBCPP_NODEBUG = const _Tp;
};
@@ -28,7 +28,7 @@ using add_const_t = typename add_const<_Tp>::type;
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS add_cv {
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS add_cv {
using type _LIBCPP_NODEBUG = const volatile _Tp;
};
@@ -38,7 +38,7 @@ using add_cv_t = typename add_cv<_Tp>::type;
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS add_volatile {
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS add_volatile {
using type _LIBCPP_NODEBUG = volatile _Tp;
};
diff --git a/libcxx/include/__type_traits/aligned_storage.h b/libcxx/include/__type_traits/aligned_storage.h
index a5851c37fde61..ebc2e5b65c159 100644
--- a/libcxx/include/__type_traits/aligned_storage.h
+++ b/libcxx/include/__type_traits/aligned_storage.h
@@ -68,7 +68,7 @@ struct __find_max_align<__type_list<_Head, _Tail...>, _Len>
__select_align<_Len, _Head::value, __find_max_align<__type_list<_Tail...>, _Len>::value>::value> {};
template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
-struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS aligned_storage {
+struct [[__libcpp_deprecated_in_cxx23(), __libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS aligned_storage {
union _ALIGNAS(_Align) type {
unsigned char __data[(_Len + _Align - 1) / _Align * _Align];
};
@@ -78,7 +78,7 @@ struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIO
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
-using aligned_storage_t _LIBCPP_DEPRECATED_IN_CXX23 = typename aligned_storage<_Len, _Align>::type;
+using aligned_storage_t [[__libcpp_deprecated_in_cxx23()]] = typename aligned_storage<_Len, _Align>::type;
_LIBCPP_SUPPRESS_DEPRECATED_POP
#endif
diff --git a/libcxx/include/__type_traits/aligned_union.h b/libcxx/include/__type_traits/aligned_union.h
index 1223dc25e40a0..99a86b9a7213b 100644
--- a/libcxx/include/__type_traits/aligned_union.h
+++ b/libcxx/include/__type_traits/aligned_union.h
@@ -33,7 +33,7 @@ struct __static_max<_I0, _I1, _In...> {
};
template <size_t _Len, class _Type0, class... _Types>
-struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_NO_SPECIALIZATIONS aligned_union {
+struct [[__libcpp_deprecated_in_cxx23()]] _LIBCPP_NO_SPECIALIZATIONS aligned_union {
static const size_t alignment_value =
__static_max<_LIBCPP_PREFERRED_ALIGNOF(_Type0), _LIBCPP_PREFERRED_ALIGNOF(_Types)...>::value;
static const size_t __len = __static_max<_Len, sizeof(_Type0), sizeof(_Types)...>::value;
@@ -42,7 +42,7 @@ struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_NO_SPECIALIZATIONS aligned_union {
#if _LIBCPP_STD_VER >= 14
template <size_t _Len, class... _Types>
-using aligned_union_t _LIBCPP_DEPRECATED_IN_CXX23 = typename aligned_union<_Len, _Types...>::type;
+using aligned_union_t [[__libcpp_deprecated_in_cxx23()]] = typename aligned_union<_Len, _Types...>::type;
#endif
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/alignment_of.h b/libcxx/include/__type_traits/alignment_of.h
index 9801cac2cadd2..0a94c996af9a4 100644
--- a/libcxx/include/__type_traits/alignment_of.h
+++ b/libcxx/include/__type_traits/alignment_of.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS alignment_of
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS alignment_of
: public integral_constant<size_t, _LIBCPP_ALIGNOF(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/common_type.h b/libcxx/include/__type_traits/common_type.h
index e4c6b495c3bda..b8f99daa439f4 100644
--- a/libcxx/include/__type_traits/common_type.h
+++ b/libcxx/include/__type_traits/common_type.h
@@ -70,7 +70,7 @@ struct __common_type_impl {};
template <class... _Tp>
struct __common_types;
template <class... _Tp>
-struct _LIBCPP_TEMPLATE_VIS common_type;
+struct [[__libcpp_template_vis]] common_type;
template <class _Tp, class _Up>
struct __common_type_impl< __common_types<_Tp, _Up>, __void_t<typename common_type<_Tp, _Up>::type> > {
@@ -84,18 +84,18 @@ struct __common_type_impl<__common_types<_Tp, _Up, _Vp, _Rest...>, __void_t<type
// bullet 1 - sizeof...(Tp) == 0
template <>
-struct _LIBCPP_TEMPLATE_VIS common_type<> {};
+struct [[__libcpp_template_vis]] common_type<> {};
// bullet 2 - sizeof...(Tp) == 1
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS common_type<_Tp> : public common_type<_Tp, _Tp> {};
+struct [[__libcpp_template_vis]] common_type<_Tp> : public common_type<_Tp, _Tp> {};
// bullet 3 - sizeof...(Tp) == 2
// sub-bullet 1 - "If is_same_v<T1, D1> is false or ..."
template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up>
+struct [[__libcpp_template_vis]] common_type<_Tp, _Up>
: __conditional_t<_IsSame<_Tp, __decay_t<_Tp> >::value && _IsSame<_Up, __decay_t<_Up> >::value,
__common_type2_imp<_Tp, _Up>,
common_type<__decay_t<_Tp>, __decay_t<_Up> > > {};
@@ -103,7 +103,7 @@ struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up>
// bullet 4 - sizeof...(Tp) > 2
template <class _Tp, class _Up, class _Vp, class... _Rest>
-struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up, _Vp, _Rest...>
+struct [[__libcpp_template_vis]] common_type<_Tp, _Up, _Vp, _Rest...>
: __common_type_impl<__common_types<_Tp, _Up, _Vp, _Rest...> > {};
#endif
diff --git a/libcxx/include/__type_traits/conditional.h b/libcxx/include/__type_traits/conditional.h
index 20460c7f2e39c..95d181b9e5b9b 100644
--- a/libcxx/include/__type_traits/conditional.h
+++ b/libcxx/include/__type_traits/conditional.h
@@ -36,7 +36,7 @@ template <bool _Cond, class _IfRes, class _ElseRes>
using _If _LIBCPP_NODEBUG = typename _IfImpl<_Cond>::template _Select<_IfRes, _ElseRes>;
template <bool _Bp, class _If, class _Then>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS conditional {
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS conditional {
using type _LIBCPP_NODEBUG = _If;
};
@@ -45,7 +45,7 @@ _LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-specialization")
#endif
template <class _If, class _Then>
-struct _LIBCPP_TEMPLATE_VIS conditional<false, _If, _Then> {
+struct [[__libcpp_template_vis]] conditional<false, _If, _Then> {
using type _LIBCPP_NODEBUG = _Then;
};
_LIBCPP_DIAGNOSTIC_POP
diff --git a/libcxx/include/__type_traits/decay.h b/libcxx/include/__type_traits/decay.h
index 2fd73d3dde45d..cdba3a4635c5c 100644
--- a/libcxx/include/__type_traits/decay.h
+++ b/libcxx/include/__type_traits/decay.h
@@ -50,7 +50,7 @@ struct __decay<_Up, true> {
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS decay {
+struct [[__libcpp_template_vis]] decay {
private:
using _Up _LIBCPP_NODEBUG = __libcpp_remove_reference_t<_Tp>;
diff --git a/libcxx/include/__type_traits/dependent_type.h b/libcxx/include/__type_traits/dependent_type.h
index db8a869820db3..73eeba54a1d90 100644
--- a/libcxx/include/__type_traits/dependent_type.h
+++ b/libcxx/include/__type_traits/dependent_type.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, bool>
-struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {};
+struct [[__libcpp_template_vis]] __dependent_type : public _Tp {};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__type_traits/enable_if.h b/libcxx/include/__type_traits/enable_if.h
index b572092542d4a..df02c1b9c0a4c 100644
--- a/libcxx/include/__type_traits/enable_if.h
+++ b/libcxx/include/__type_traits/enable_if.h
@@ -18,14 +18,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <bool, class _Tp = void>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS enable_if{};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS enable_if{};
_LIBCPP_DIAGNOSTIC_PUSH
#if __has_warning("-Winvalid-specialization")
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-specialization")
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS enable_if<true, _Tp> {
+struct [[__libcpp_template_vis]] enable_if<true, _Tp> {
typedef _Tp type;
};
_LIBCPP_DIAGNOSTIC_POP
diff --git a/libcxx/include/__type_traits/extent.h b/libcxx/include/__type_traits/extent.h
index 6f3db916f96dc..5dc338ac037b1 100644
--- a/libcxx/include/__type_traits/extent.h
+++ b/libcxx/include/__type_traits/extent.h
@@ -22,7 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__array_extent)
template <class _Tp, size_t _Dim = 0>
-struct _LIBCPP_NO_SPECIALIZATIONS _LIBCPP_TEMPLATE_VIS extent : integral_constant<size_t, __array_extent(_Tp, _Dim)> {};
+struct _LIBCPP_NO_SPECIALIZATIONS [[__libcpp_template_vis]]
+extent : integral_constant<size_t, __array_extent(_Tp, _Dim)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp, unsigned _Ip = 0>
@@ -32,15 +33,16 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr size_t extent_v = __array_extent(_Tp
#else // __has_builtin(__array_extent)
template <class _Tp, unsigned _Ip = 0>
-struct _LIBCPP_TEMPLATE_VIS extent : public integral_constant<size_t, 0> {};
+struct [[__libcpp_template_vis]] extent : public integral_constant<size_t, 0> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], 0> : public integral_constant<size_t, 0> {};
+struct [[__libcpp_template_vis]] extent<_Tp[], 0> : public integral_constant<size_t, 0> {};
template <class _Tp, unsigned _Ip>
-struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], _Ip> : public integral_constant<size_t, extent<_Tp, _Ip - 1>::value> {};
+struct [[__libcpp_template_vis]] extent<_Tp[], _Ip> : public integral_constant<size_t, extent<_Tp, _Ip - 1>::value> {};
template <class _Tp, size_t _Np>
-struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], 0> : public integral_constant<size_t, _Np> {};
+struct [[__libcpp_template_vis]] extent<_Tp[_Np], 0> : public integral_constant<size_t, _Np> {};
template <class _Tp, size_t _Np, unsigned _Ip>
-struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], _Ip> : public integral_constant<size_t, extent<_Tp, _Ip - 1>::value> {};
+struct [[__libcpp_template_vis]] extent<_Tp[_Np], _Ip> : public integral_constant<size_t, extent<_Tp, _Ip - 1>::value> {
+};
# if _LIBCPP_STD_VER >= 17
template <class _Tp, unsigned _Ip = 0>
diff --git a/libcxx/include/__type_traits/has_unique_object_representation.h b/libcxx/include/__type_traits/has_unique_object_representation.h
index d92fef0b5d2ba..63f5bcdf98bd7 100644
--- a/libcxx/include/__type_traits/has_unique_object_representation.h
+++ b/libcxx/include/__type_traits/has_unique_object_representation.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS has_unique_object_representations
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS has_unique_object_representations
// TODO: We work around a Clang and GCC bug in __has_unique_object_representations by using remove_all_extents
// even though it should not be necessary. This was reported to the compilers:
// - Clang: https://github.com/llvm/llvm-project/issues/95311
diff --git a/libcxx/include/__type_traits/has_virtual_destructor.h b/libcxx/include/__type_traits/has_virtual_destructor.h
index 98fa3cf692398..c550b7af852d5 100644
--- a/libcxx/include/__type_traits/has_virtual_destructor.h
+++ b/libcxx/include/__type_traits/has_virtual_destructor.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS has_virtual_destructor
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS has_virtual_destructor
: public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/integral_constant.h b/libcxx/include/__type_traits/integral_constant.h
index 8feeff630d874..e9469bc0f9408 100644
--- a/libcxx/include/__type_traits/integral_constant.h
+++ b/libcxx/include/__type_traits/integral_constant.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, _Tp __v>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS integral_constant {
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS integral_constant {
static inline _LIBCPP_CONSTEXPR const _Tp value = __v;
typedef _Tp value_type;
typedef integral_constant type;
diff --git a/libcxx/include/__type_traits/invoke.h b/libcxx/include/__type_traits/invoke.h
index ba4d539ee20b0..d72f2cdaa20d9 100644
--- a/libcxx/include/__type_traits/invoke.h
+++ b/libcxx/include/__type_traits/invoke.h
@@ -278,10 +278,11 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Ret __invoke_r(_Args&&... _
// is_invocable
template <class _Fn, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_invocable : bool_constant<__is_invocable_v<_Fn, _Args...>> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_invocable
+ : bool_constant<__is_invocable_v<_Fn, _Args...>> {};
template <class _Ret, class _Fn, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_invocable_r
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_invocable_r
: bool_constant<__is_invocable_r_v<_Ret, _Fn, _Args...>> {};
template <class _Fn, class... _Args>
@@ -293,11 +294,11 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_invocable_r_v = __is_invocab
// is_nothrow_invocable
template <class _Fn, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_invocable
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_invocable
: bool_constant<__nothrow_invokable<_Fn, _Args...>::value> {};
template <class _Ret, class _Fn, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_invocable_r
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_invocable_r
: bool_constant<__nothrow_invokable_r<_Ret, _Fn, _Args...>::value> {};
template <class _Fn, class... _Args>
@@ -308,7 +309,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_invocable_r_v =
is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
template <class _Fn, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS invoke_result : __invoke_result<_Fn, _Args...> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS invoke_result : __invoke_result<_Fn, _Args...> {};
template <class _Fn, class... _Args>
using invoke_result_t = typename invoke_result<_Fn, _Args...>::type;
diff --git a/libcxx/include/__type_traits/is_abstract.h b/libcxx/include/__type_traits/is_abstract.h
index 20b9e56cd60eb..d0cfeda14636f 100644
--- a/libcxx/include/__type_traits/is_abstract.h
+++ b/libcxx/include/__type_traits/is_abstract.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_abstract
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_abstract
: public integral_constant<bool, __is_abstract(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_aggregate.h b/libcxx/include/__type_traits/is_aggregate.h
index b5098ee1bcf1a..3259bfb42c6f5 100644
--- a/libcxx/include/__type_traits/is_aggregate.h
+++ b/libcxx/include/__type_traits/is_aggregate.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_aggregate
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_aggregate
: public integral_constant<bool, __is_aggregate(_Tp)> {};
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_arithmetic.h b/libcxx/include/__type_traits/is_arithmetic.h
index fcb31e9f5d5da..fd81d209ea38a 100644
--- a/libcxx/include/__type_traits/is_arithmetic.h
+++ b/libcxx/include/__type_traits/is_arithmetic.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_arithmetic
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_arithmetic
: public integral_constant<bool, is_integral<_Tp>::value || is_floating_point<_Tp>::value> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_array.h b/libcxx/include/__type_traits/is_array.h
index 0bde0aa970f88..4f3175c807ef4 100644
--- a/libcxx/include/__type_traits/is_array.h
+++ b/libcxx/include/__type_traits/is_array.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
(!defined(_LIBCPP_COMPILER_CLANG_BASED) || (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1900))
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_array : _BoolConstant<__is_array(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_array : _BoolConstant<__is_array(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -33,11 +33,11 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_array_v = __is_array(_Tp);
#else
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_array : public false_type {};
+struct [[__libcpp_template_vis]] is_array : public false_type {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[]> : public true_type {};
+struct [[__libcpp_template_vis]] is_array<_Tp[]> : public true_type {};
template <class _Tp, size_t _Np>
-struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[_Np]> : public true_type {};
+struct [[__libcpp_template_vis]] is_array<_Tp[_Np]> : public true_type {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_assignable.h b/libcxx/include/__type_traits/is_assignable.h
index 2a87bcc673e51..96ec1c5f1d6d1 100644
--- a/libcxx/include/__type_traits/is_assignable.h
+++ b/libcxx/include/__type_traits/is_assignable.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_assignable : _BoolConstant<__is_assignable(_Tp, _Up)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_assignable : _BoolConstant<__is_assignable(_Tp, _Up)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp, class _Arg>
@@ -29,7 +29,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_assignable_v = __is_assignab
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_copy_assignable
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_copy_assignable
: public integral_constant<bool,
__is_assignable(__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<const _Tp>)> {};
@@ -39,7 +39,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_copy_assignable_v = is_copy_
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_move_assignable
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_move_assignable
: public integral_constant<bool, __is_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_base_of.h b/libcxx/include/__type_traits/is_base_of.h
index a48b8caded721..f13993904b038 100644
--- a/libcxx/include/__type_traits/is_base_of.h
+++ b/libcxx/include/__type_traits/is_base_of.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Bp, class _Dp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_base_of
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_base_of
: public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
#if _LIBCPP_STD_VER >= 17
@@ -31,7 +31,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_base_of_v = __is_base_of(_Bp
# if __has_builtin(__builtin_is_virtual_base_of)
template <class _Base, class _Derived>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_virtual_base_of
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_virtual_base_of
: public bool_constant<__builtin_is_virtual_base_of(_Base, _Derived)> {};
template <class _Base, class _Derived>
diff --git a/libcxx/include/__type_traits/is_bounded_array.h b/libcxx/include/__type_traits/is_bounded_array.h
index a853cc6d821ed..09f6e541ccfdf 100644
--- a/libcxx/include/__type_traits/is_bounded_array.h
+++ b/libcxx/include/__type_traits/is_bounded_array.h
@@ -27,14 +27,14 @@ inline const bool __is_bounded_array_v<_Tp[_Np]> = true;
#if _LIBCPP_STD_VER >= 20
template <class>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_bounded_array : false_type {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_bounded_array : false_type {};
_LIBCPP_DIAGNOSTIC_PUSH
# if __has_warning("-Winvalid-specialization")
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-specialization")
# endif
template <class _Tp, size_t _Np>
-struct _LIBCPP_TEMPLATE_VIS is_bounded_array<_Tp[_Np]> : true_type {};
+struct [[__libcpp_template_vis]] is_bounded_array<_Tp[_Np]> : true_type {};
_LIBCPP_DIAGNOSTIC_POP
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_class.h b/libcxx/include/__type_traits/is_class.h
index 5fce840058c05..d5abe2df27509 100644
--- a/libcxx/include/__type_traits/is_class.h
+++ b/libcxx/include/__type_traits/is_class.h
@@ -19,7 +19,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_class : public integral_constant<bool, __is_class(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_class : public integral_constant<bool, __is_class(_Tp)> {
+};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_compound.h b/libcxx/include/__type_traits/is_compound.h
index 6dc22f8a91116..5d5ddb36f97bd 100644
--- a/libcxx/include/__type_traits/is_compound.h
+++ b/libcxx/include/__type_traits/is_compound.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_compound)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_compound : _BoolConstant<__is_compound(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_compound : _BoolConstant<__is_compound(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -32,7 +32,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_compound_v = __is_compound(_
#else // __has_builtin(__is_compound)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_compound : public integral_constant<bool, !is_fundamental<_Tp>::value> {};
+struct [[__libcpp_template_vis]] is_compound : public integral_constant<bool, !is_fundamental<_Tp>::value> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_const.h b/libcxx/include/__type_traits/is_const.h
index 78f98f3a96d4f..7138598ad0212 100644
--- a/libcxx/include/__type_traits/is_const.h
+++ b/libcxx/include/__type_traits/is_const.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_const)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_const : _BoolConstant<__is_const(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_const : _BoolConstant<__is_const(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -31,9 +31,9 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_const_v = __is_const(_Tp);
#else
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_const : public false_type {};
+struct [[__libcpp_template_vis]] is_const : public false_type {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_const<_Tp const> : public true_type {};
+struct [[__libcpp_template_vis]] is_const<_Tp const> : public true_type {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_constructible.h b/libcxx/include/__type_traits/is_constructible.h
index 6c7636e0bb509..60f863635d323 100644
--- a/libcxx/include/__type_traits/is_constructible.h
+++ b/libcxx/include/__type_traits/is_constructible.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_constructible
: public integral_constant<bool, __is_constructible(_Tp, _Args...)> {};
#if _LIBCPP_STD_VER >= 17
@@ -30,7 +30,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_constructible_v = __is_const
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_copy_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_copy_constructible
: public integral_constant<bool, __is_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)> {};
#if _LIBCPP_STD_VER >= 17
@@ -39,7 +39,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_copy_constructible_v = is_co
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_move_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_move_constructible
: public integral_constant<bool, __is_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};
#if _LIBCPP_STD_VER >= 17
@@ -48,7 +48,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_move_constructible_v = is_mo
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_default_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_default_constructible
: public integral_constant<bool, __is_constructible(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_convertible.h b/libcxx/include/__type_traits/is_convertible.h
index 61f6cf644124e..10576483be3a2 100644
--- a/libcxx/include/__type_traits/is_convertible.h
+++ b/libcxx/include/__type_traits/is_convertible.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _T1, class _T2>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_convertible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_convertible
: public integral_constant<bool, __is_convertible(_T1, _T2)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_destructible.h b/libcxx/include/__type_traits/is_destructible.h
index 5fe923d303c53..c7208c87e661c 100644
--- a/libcxx/include/__type_traits/is_destructible.h
+++ b/libcxx/include/__type_traits/is_destructible.h
@@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_destructible)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_destructible : _BoolConstant<__is_destructible(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_destructible : _BoolConstant<__is_destructible(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_empty.h b/libcxx/include/__type_traits/is_empty.h
index 8e66cd97a9f28..85329c7a718dc 100644
--- a/libcxx/include/__type_traits/is_empty.h
+++ b/libcxx/include/__type_traits/is_empty.h
@@ -19,7 +19,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_empty : public integral_constant<bool, __is_empty(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_empty : public integral_constant<bool, __is_empty(_Tp)> {
+};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_enum.h b/libcxx/include/__type_traits/is_enum.h
index bc210ea289e62..4c623b8f65f1d 100644
--- a/libcxx/include/__type_traits/is_enum.h
+++ b/libcxx/include/__type_traits/is_enum.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_enum : public integral_constant<bool, __is_enum(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_enum : public integral_constant<bool, __is_enum(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -29,7 +29,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_enum_v = __is_enum(_Tp);
#if _LIBCPP_STD_VER >= 23
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_scoped_enum : bool_constant<__is_scoped_enum(_Tp)> {};
template <class _Tp>
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_scoped_enum_v = __is_scoped_enum(_Tp);
diff --git a/libcxx/include/__type_traits/is_final.h b/libcxx/include/__type_traits/is_final.h
index 19d3ac3ecd35f..de2e18fde3475 100644
--- a/libcxx/include/__type_traits/is_final.h
+++ b/libcxx/include/__type_traits/is_final.h
@@ -19,11 +19,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS __libcpp_is_final : public integral_constant<bool, __is_final(_Tp)> {};
+struct [[__libcpp_template_vis]] __libcpp_is_final : public integral_constant<bool, __is_final(_Tp)> {};
#if _LIBCPP_STD_VER >= 14
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_final : public integral_constant<bool, __is_final(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_final : public integral_constant<bool, __is_final(_Tp)> {
+};
#endif
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_floating_point.h b/libcxx/include/__type_traits/is_floating_point.h
index 563ecce891f22..0fed4aaabecb3 100644
--- a/libcxx/include/__type_traits/is_floating_point.h
+++ b/libcxx/include/__type_traits/is_floating_point.h
@@ -27,7 +27,7 @@ template <> struct __libcpp_is_floating_point<long double> : public tru
// clang-format on
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_floating_point
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_floating_point
: public __libcpp_is_floating_point<__remove_cv_t<_Tp> > {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_function.h b/libcxx/include/__type_traits/is_function.h
index 63b842b26c4ce..ae5451424ae26 100644
--- a/libcxx/include/__type_traits/is_function.h
+++ b/libcxx/include/__type_traits/is_function.h
@@ -19,7 +19,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_function : integral_constant<bool, __is_function(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_function : integral_constant<bool, __is_function(_Tp)> {
+};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_fundamental.h b/libcxx/include/__type_traits/is_fundamental.h
index 03e25474bea77..f85fca362618a 100644
--- a/libcxx/include/__type_traits/is_fundamental.h
+++ b/libcxx/include/__type_traits/is_fundamental.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_fundamental)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_fundamental : _BoolConstant<__is_fundamental(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_fundamental : _BoolConstant<__is_fundamental(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -33,7 +33,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_fundamental_v = __is_fundame
#else // __has_builtin(__is_fundamental)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_fundamental
+struct [[__libcpp_template_vis]] is_fundamental
: public integral_constant<bool, is_void<_Tp>::value || __is_null_pointer_v<_Tp> || is_arithmetic<_Tp>::value> {};
# if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_implicit_lifetime.h b/libcxx/include/__type_traits/is_implicit_lifetime.h
index 8b992095f105b..5b5185612c667 100644
--- a/libcxx/include/__type_traits/is_implicit_lifetime.h
+++ b/libcxx/include/__type_traits/is_implicit_lifetime.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
# if __has_builtin(__builtin_is_implicit_lifetime)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_implicit_lifetime
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_implicit_lifetime
: public bool_constant<__builtin_is_implicit_lifetime(_Tp)> {};
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_integral.h b/libcxx/include/__type_traits/is_integral.h
index 6ae9b31a8e9b6..e6bef97efa9e9 100644
--- a/libcxx/include/__type_traits/is_integral.h
+++ b/libcxx/include/__type_traits/is_integral.h
@@ -50,7 +50,7 @@ template <> struct __libcpp_is_integral<__uint128_t> { enum { va
#if __has_builtin(__is_integral)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_integral : _BoolConstant<__is_integral(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_integral : _BoolConstant<__is_integral(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -60,7 +60,8 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_integral_v = __is_integral(_
#else
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_integral : public _BoolConstant<__libcpp_is_integral<__remove_cv_t<_Tp> >::value> {};
+struct [[__libcpp_template_vis]] is_integral : public _BoolConstant<__libcpp_is_integral<__remove_cv_t<_Tp> >::value> {
+};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_literal_type.h b/libcxx/include/__type_traits/is_literal_type.h
index e78343ee2f0be..d9df2319d19f0 100644
--- a/libcxx/include/__type_traits/is_literal_type.h
+++ b/libcxx/include/__type_traits/is_literal_type.h
@@ -20,12 +20,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_NO_SPECIALIZATIONS is_literal_type
+struct [[__libcpp_template_vis, __libcpp_deprecated_in_cxx17()]] _LIBCPP_NO_SPECIALIZATIONS is_literal_type
: public integral_constant<bool, __is_literal_type(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_literal_type_v = __is_literal_type(_Tp);
+[[__libcpp_deprecated_in_cxx17()]] _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_literal_type_v =
+ __is_literal_type(_Tp);
# endif // _LIBCPP_STD_VER >= 17
#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
diff --git a/libcxx/include/__type_traits/is_member_pointer.h b/libcxx/include/__type_traits/is_member_pointer.h
index 8a4f1fe0c736f..8a026ee7e5dfc 100644
--- a/libcxx/include/__type_traits/is_member_pointer.h
+++ b/libcxx/include/__type_traits/is_member_pointer.h
@@ -19,14 +19,15 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_member_pointer
+ : _BoolConstant<__is_member_pointer(_Tp)> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_member_object_pointer
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_member_object_pointer
: _BoolConstant<__is_member_object_pointer(_Tp)> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_member_function_pointer
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_member_function_pointer
: _BoolConstant<__is_member_function_pointer(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_nothrow_assignable.h b/libcxx/include/__type_traits/is_nothrow_assignable.h
index 4727deb6c3f85..9758acf173fb8 100644
--- a/libcxx/include/__type_traits/is_nothrow_assignable.h
+++ b/libcxx/include/__type_traits/is_nothrow_assignable.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Arg>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_assignable
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_assignable
: public integral_constant<bool, __is_nothrow_assignable(_Tp, _Arg)> {};
#if _LIBCPP_STD_VER >= 17
@@ -30,7 +30,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_assignable_v = __is_
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_copy_assignable
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_copy_assignable
: public integral_constant<
bool,
__is_nothrow_assignable(__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<const _Tp>)> {};
@@ -41,7 +41,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_copy_assignable_v =
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_move_assignable
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_move_assignable
: public integral_constant<bool,
__is_nothrow_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {
};
diff --git a/libcxx/include/__type_traits/is_nothrow_constructible.h b/libcxx/include/__type_traits/is_nothrow_constructible.h
index 1e4eebd006ec1..fb5c4c428298d 100644
--- a/libcxx/include/__type_traits/is_nothrow_constructible.h
+++ b/libcxx/include/__type_traits/is_nothrow_constructible.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template < class _Tp, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_constructible
: public integral_constant<bool, __is_nothrow_constructible(_Tp, _Args...)> {};
#if _LIBCPP_STD_VER >= 17
@@ -31,7 +31,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_constructible_v =
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_copy_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_copy_constructible
: public integral_constant< bool, __is_nothrow_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)> {};
#if _LIBCPP_STD_VER >= 17
@@ -41,7 +41,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_copy_constructible_v
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_move_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_move_constructible
: public integral_constant<bool, __is_nothrow_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};
#if _LIBCPP_STD_VER >= 17
@@ -51,7 +51,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_move_constructible_v
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_default_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_default_constructible
: public integral_constant<bool, __is_nothrow_constructible(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_nothrow_destructible.h b/libcxx/include/__type_traits/is_nothrow_destructible.h
index a363ad6b4af3b..f5c07d5c05c08 100644
--- a/libcxx/include/__type_traits/is_nothrow_destructible.h
+++ b/libcxx/include/__type_traits/is_nothrow_destructible.h
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_nothrow_destructible)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_destructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_destructible
: integral_constant<bool, __is_nothrow_destructible(_Tp)> {};
#else
@@ -40,17 +40,17 @@ struct __libcpp_is_nothrow_destructible<true, _Tp>
: public integral_constant<bool, noexcept(std::declval<_Tp>().~_Tp()) > {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
- : public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp> {};
+struct [[__libcpp_template_vis]]
+is_nothrow_destructible : public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp> {};
template <class _Tp, size_t _Ns>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[_Ns]> : public is_nothrow_destructible<_Tp> {};
+struct [[__libcpp_template_vis]] is_nothrow_destructible<_Tp[_Ns]> : public is_nothrow_destructible<_Tp> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&> : public true_type {};
+struct [[__libcpp_template_vis]] is_nothrow_destructible<_Tp&> : public true_type {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&&> : public true_type {};
+struct [[__libcpp_template_vis]] is_nothrow_destructible<_Tp&&> : public true_type {};
#endif // __has_builtin(__is_nothrow_destructible)
diff --git a/libcxx/include/__type_traits/is_null_pointer.h b/libcxx/include/__type_traits/is_null_pointer.h
index fc6c6a69de338..c6ef356dbfb71 100644
--- a/libcxx/include/__type_traits/is_null_pointer.h
+++ b/libcxx/include/__type_traits/is_null_pointer.h
@@ -24,7 +24,7 @@ inline const bool __is_null_pointer_v = __is_same(__remove_cv(_Tp), nullptr_t);
#if _LIBCPP_STD_VER >= 14
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_null_pointer
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_null_pointer
: integral_constant<bool, __is_null_pointer_v<_Tp>> {};
# if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_object.h b/libcxx/include/__type_traits/is_object.h
index eba4ab5cb8806..82f1395c20180 100644
--- a/libcxx/include/__type_traits/is_object.h
+++ b/libcxx/include/__type_traits/is_object.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_object : _BoolConstant<__is_object(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_object : _BoolConstant<__is_object(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_pod.h b/libcxx/include/__type_traits/is_pod.h
index a57662400394a..6eb740e6fe513 100644
--- a/libcxx/include/__type_traits/is_pod.h
+++ b/libcxx/include/__type_traits/is_pod.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_pod : public integral_constant<bool, __is_pod(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_pod : public integral_constant<bool, __is_pod(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_pointer.h b/libcxx/include/__type_traits/is_pointer.h
index 5647bf4045ff3..2fd5aefedec23 100644
--- a/libcxx/include/__type_traits/is_pointer.h
+++ b/libcxx/include/__type_traits/is_pointer.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_pointer)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_pointer : _BoolConstant<__is_pointer(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_pointer : _BoolConstant<__is_pointer(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -50,7 +50,7 @@ template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __unsafe_unretai
# endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_pointer
+struct [[__libcpp_template_vis]] is_pointer
: public __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<__remove_cv_t<_Tp> >::type> {};
# if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_polymorphic.h b/libcxx/include/__type_traits/is_polymorphic.h
index 17e9c21c0d6a1..d4f4172459157 100644
--- a/libcxx/include/__type_traits/is_polymorphic.h
+++ b/libcxx/include/__type_traits/is_polymorphic.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_polymorphic
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_polymorphic
: public integral_constant<bool, __is_polymorphic(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_reference.h b/libcxx/include/__type_traits/is_reference.h
index 564e888b77c13..035d15cdc8d70 100644
--- a/libcxx/include/__type_traits/is_reference.h
+++ b/libcxx/include/__type_traits/is_reference.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_reference : _BoolConstant<__is_reference(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_reference : _BoolConstant<__is_reference(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -29,12 +29,12 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_reference_v = __is_reference
#if __has_builtin(__is_lvalue_reference) && __has_builtin(__is_rvalue_reference)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> {
-};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_lvalue_reference
+ : _BoolConstant<__is_lvalue_reference(_Tp)> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_rvalue_reference : _BoolConstant<__is_rvalue_reference(_Tp)> {
-};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_rvalue_reference
+ : _BoolConstant<__is_rvalue_reference(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -46,14 +46,14 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_rvalue_reference_v = __is_rv
#else // __has_builtin(__is_lvalue_reference)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {};
+struct [[__libcpp_template_vis]] is_lvalue_reference : public false_type {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference<_Tp&> : public true_type {};
+struct [[__libcpp_template_vis]] is_lvalue_reference<_Tp&> : public true_type {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : public false_type {};
+struct [[__libcpp_template_vis]] is_rvalue_reference : public false_type {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {};
+struct [[__libcpp_template_vis]] is_rvalue_reference<_Tp&&> : public true_type {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_same.h b/libcxx/include/__type_traits/is_same.h
index befab8999ae26..5fad3f8f534c4 100644
--- a/libcxx/include/__type_traits/is_same.h
+++ b/libcxx/include/__type_traits/is_same.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_same : _BoolConstant<__is_same(_Tp, _Up)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_same : _BoolConstant<__is_same(_Tp, _Up)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp, class _Up>
diff --git a/libcxx/include/__type_traits/is_scalar.h b/libcxx/include/__type_traits/is_scalar.h
index 6ef57e1dd22d5..0f4b15038c912 100644
--- a/libcxx/include/__type_traits/is_scalar.h
+++ b/libcxx/include/__type_traits/is_scalar.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_scalar)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_scalar : _BoolConstant<__is_scalar(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_scalar : _BoolConstant<__is_scalar(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -44,7 +44,7 @@ struct __is_block<_Rp (^)(_Args...)> : true_type {};
// clang-format off
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_scalar
+struct [[__libcpp_template_vis]] is_scalar
: public integral_constant<
bool, is_arithmetic<_Tp>::value ||
is_member_pointer<_Tp>::value ||
@@ -55,7 +55,7 @@ struct _LIBCPP_TEMPLATE_VIS is_scalar
// clang-format on
template <>
-struct _LIBCPP_TEMPLATE_VIS is_scalar<nullptr_t> : public true_type {};
+struct [[__libcpp_template_vis]] is_scalar<nullptr_t> : public true_type {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_signed.h b/libcxx/include/__type_traits/is_signed.h
index 535324fdbfc14..eba811ddaea6d 100644
--- a/libcxx/include/__type_traits/is_signed.h
+++ b/libcxx/include/__type_traits/is_signed.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_signed)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_signed : _BoolConstant<__is_signed(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_signed : _BoolConstant<__is_signed(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -45,7 +45,7 @@ template <class _Tp>
struct __libcpp_is_signed<_Tp, false> : public false_type {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_signed : public __libcpp_is_signed<_Tp> {};
+struct [[__libcpp_template_vis]] is_signed : public __libcpp_is_signed<_Tp> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_standard_layout.h b/libcxx/include/__type_traits/is_standard_layout.h
index e70d0f365416e..a84c8b6fa45a0 100644
--- a/libcxx/include/__type_traits/is_standard_layout.h
+++ b/libcxx/include/__type_traits/is_standard_layout.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_standard_layout
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_standard_layout
: public integral_constant<bool, __is_standard_layout(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_swappable.h b/libcxx/include/__type_traits/is_swappable.h
index c7527814cffb9..c311128d804ec 100644
--- a/libcxx/include/__type_traits/is_swappable.h
+++ b/libcxx/include/__type_traits/is_swappable.h
@@ -77,7 +77,7 @@ template <class _Tp, class _Up>
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_swappable_with_v = __is_swappable_with_v<_Tp, _Up>;
template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_swappable_with
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_swappable_with
: bool_constant<is_swappable_with_v<_Tp, _Up>> {};
template <class _Tp>
@@ -85,13 +85,13 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_swappable_v =
is_swappable_with_v<__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<_Tp>>;
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_swappable : bool_constant<is_swappable_v<_Tp>> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_swappable : bool_constant<is_swappable_v<_Tp>> {};
template <class _Tp, class _Up>
_LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_swappable_with_v = __is_nothrow_swappable_with_v<_Tp, _Up>;
template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_swappable_with
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_swappable_with
: bool_constant<is_nothrow_swappable_with_v<_Tp, _Up>> {};
template <class _Tp>
@@ -99,7 +99,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_nothrow_swappable_v =
is_nothrow_swappable_with_v<__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<_Tp>>;
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_nothrow_swappable
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_nothrow_swappable
: bool_constant<is_nothrow_swappable_v<_Tp>> {};
#endif // _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_trivial.h b/libcxx/include/__type_traits/is_trivial.h
index a4ca2d6b26d0e..dd5dead6723bd 100644
--- a/libcxx/include/__type_traits/is_trivial.h
+++ b/libcxx/include/__type_traits/is_trivial.h
@@ -19,8 +19,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_trivial : public integral_constant<bool, __is_trivial(_Tp)> {
-};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_trivial
+ : public integral_constant<bool, __is_trivial(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_trivially_assignable.h b/libcxx/include/__type_traits/is_trivially_assignable.h
index d91b6d89c7e21..438595535899d 100644
--- a/libcxx/include/__type_traits/is_trivially_assignable.h
+++ b/libcxx/include/__type_traits/is_trivially_assignable.h
@@ -30,7 +30,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_trivially_assignable_v = __i
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_trivially_copy_assignable
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_trivially_copy_assignable
: public integral_constant<
bool,
__is_trivially_assignable(__add_lvalue_reference_t<_Tp>, __add_lvalue_reference_t<const _Tp>)> {};
@@ -42,7 +42,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_trivially_copy_assignable_v
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_trivially_move_assignable
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_trivially_move_assignable
: public integral_constant<
bool,
__is_trivially_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {};
diff --git a/libcxx/include/__type_traits/is_trivially_constructible.h b/libcxx/include/__type_traits/is_trivially_constructible.h
index 4a212d462b63f..93a50401d78e9 100644
--- a/libcxx/include/__type_traits/is_trivially_constructible.h
+++ b/libcxx/include/__type_traits/is_trivially_constructible.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_trivially_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_trivially_constructible
: integral_constant<bool, __is_trivially_constructible(_Tp, _Args...)> {};
#if _LIBCPP_STD_VER >= 17
@@ -31,7 +31,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_trivially_constructible_v =
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_trivially_copy_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_trivially_copy_constructible
: public integral_constant<bool, __is_trivially_constructible(_Tp, __add_lvalue_reference_t<const _Tp>)> {};
#if _LIBCPP_STD_VER >= 17
@@ -41,7 +41,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_trivially_copy_constructible
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_trivially_move_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_trivially_move_constructible
: public integral_constant<bool, __is_trivially_constructible(_Tp, __add_rvalue_reference_t<_Tp>)> {};
#if _LIBCPP_STD_VER >= 17
@@ -51,7 +51,7 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_trivially_move_constructible
#endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_trivially_default_constructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_trivially_default_constructible
: public integral_constant<bool, __is_trivially_constructible(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_trivially_copyable.h b/libcxx/include/__type_traits/is_trivially_copyable.h
index 72f1d6beae5d4..c2cf03524b82b 100644
--- a/libcxx/include/__type_traits/is_trivially_copyable.h
+++ b/libcxx/include/__type_traits/is_trivially_copyable.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_trivially_copyable
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_trivially_copyable
: public integral_constant<bool, __is_trivially_copyable(_Tp)> {};
#if _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__type_traits/is_trivially_destructible.h b/libcxx/include/__type_traits/is_trivially_destructible.h
index 3bca575528e66..1aa4883572aa7 100644
--- a/libcxx/include/__type_traits/is_trivially_destructible.h
+++ b/libcxx/include/__type_traits/is_trivially_destructible.h
@@ -22,13 +22,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_trivially_destructible)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_trivially_destructible
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_trivially_destructible
: public integral_constant<bool, __is_trivially_destructible(_Tp)> {};
#elif __has_builtin(__has_trivial_destructor)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
+struct [[__libcpp_template_vis]] is_trivially_destructible
: public integral_constant<bool, is_destructible<_Tp>::value&& __has_trivial_destructor(_Tp)> {};
#else
diff --git a/libcxx/include/__type_traits/is_unbounded_array.h b/libcxx/include/__type_traits/is_unbounded_array.h
index 65a6e1a5276ab..30dfcf617cec3 100644
--- a/libcxx/include/__type_traits/is_unbounded_array.h
+++ b/libcxx/include/__type_traits/is_unbounded_array.h
@@ -26,14 +26,14 @@ inline const bool __is_unbounded_array_v<_Tp[]> = true;
#if _LIBCPP_STD_VER >= 20
template <class>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_unbounded_array : false_type {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_unbounded_array : false_type {};
_LIBCPP_DIAGNOSTIC_PUSH
# if __has_warning("-Winvalid-specialization")
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-specialization")
# endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_unbounded_array<_Tp[]> : true_type {};
+struct [[__libcpp_template_vis]] is_unbounded_array<_Tp[]> : true_type {};
_LIBCPP_DIAGNOSTIC_POP
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_union.h b/libcxx/include/__type_traits/is_union.h
index 4be5ae0118397..54eee4110095f 100644
--- a/libcxx/include/__type_traits/is_union.h
+++ b/libcxx/include/__type_traits/is_union.h
@@ -19,7 +19,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_union : public integral_constant<bool, __is_union(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_union : public integral_constant<bool, __is_union(_Tp)> {
+};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_unsigned.h b/libcxx/include/__type_traits/is_unsigned.h
index be855ee1d7fde..651c33c74635a 100644
--- a/libcxx/include/__type_traits/is_unsigned.h
+++ b/libcxx/include/__type_traits/is_unsigned.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_unsigned)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_unsigned : _BoolConstant<__is_unsigned(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_unsigned : _BoolConstant<__is_unsigned(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -45,7 +45,7 @@ template <class _Tp>
struct __libcpp_is_unsigned<_Tp, false> : public false_type {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {};
+struct [[__libcpp_template_vis]] is_unsigned : public __libcpp_is_unsigned<_Tp> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_void.h b/libcxx/include/__type_traits/is_void.h
index 48d73ce49ac5c..c9a9b862f18b4 100644
--- a/libcxx/include/__type_traits/is_void.h
+++ b/libcxx/include/__type_traits/is_void.h
@@ -19,7 +19,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_void : _BoolConstant<__is_same(__remove_cv(_Tp), void)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_void : _BoolConstant<__is_same(__remove_cv(_Tp), void)> {
+};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/is_volatile.h b/libcxx/include/__type_traits/is_volatile.h
index 033d1e3f3b865..a1fab4c530633 100644
--- a/libcxx/include/__type_traits/is_volatile.h
+++ b/libcxx/include/__type_traits/is_volatile.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if __has_builtin(__is_volatile)
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS is_volatile : _BoolConstant<__is_volatile(_Tp)> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS is_volatile : _BoolConstant<__is_volatile(_Tp)> {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
@@ -31,9 +31,9 @@ _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_volatile_v = __is_volatile(_
#else
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_volatile : public false_type {};
+struct [[__libcpp_template_vis]] is_volatile : public false_type {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_volatile<_Tp volatile> : public true_type {};
+struct [[__libcpp_template_vis]] is_volatile<_Tp volatile> : public true_type {};
# if _LIBCPP_STD_VER >= 17
template <class _Tp>
diff --git a/libcxx/include/__type_traits/rank.h b/libcxx/include/__type_traits/rank.h
index 1745660ce5ef7..3c48f618e4293 100644
--- a/libcxx/include/__type_traits/rank.h
+++ b/libcxx/include/__type_traits/rank.h
@@ -28,16 +28,16 @@ struct rank : integral_constant<size_t, __array_rank(_Tp)> {};
#else
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS rank : public integral_constant<size_t, 0> {};
+struct [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS rank : public integral_constant<size_t, 0> {};
_LIBCPP_DIAGNOSTIC_PUSH
# if __has_warning("-Winvalid-specialization")
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-specialization")
# endif
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS rank<_Tp[]> : public integral_constant<size_t, rank<_Tp>::value + 1> {};
+struct [[__libcpp_template_vis]] rank<_Tp[]> : public integral_constant<size_t, rank<_Tp>::value + 1> {};
template <class _Tp, size_t _Np>
-struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]> : public integral_constant<size_t, rank<_Tp>::value + 1> {};
+struct [[__libcpp_template_vis]] rank<_Tp[_Np]> : public integral_constant<size_t, rank<_Tp>::value + 1> {};
_LIBCPP_DIAGNOSTIC_POP
#endif // __has_builtin(__array_rank)
diff --git a/libcxx/include/__type_traits/remove_all_extents.h b/libcxx/include/__type_traits/remove_all_extents.h
index cb40ea4e4e1e0..7cf158326f23a 100644
--- a/libcxx/include/__type_traits/remove_all_extents.h
+++ b/libcxx/include/__type_traits/remove_all_extents.h
@@ -28,15 +28,15 @@ template <class _Tp>
using __remove_all_extents_t _LIBCPP_NODEBUG = __remove_all_extents(_Tp);
#else
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS remove_all_extents {
+struct [[__libcpp_template_vis]] remove_all_extents {
typedef _Tp type;
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[]> {
+struct [[__libcpp_template_vis]] remove_all_extents<_Tp[]> {
typedef typename remove_all_extents<_Tp>::type type;
};
template <class _Tp, size_t _Np>
-struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[_Np]> {
+struct [[__libcpp_template_vis]] remove_all_extents<_Tp[_Np]> {
typedef typename remove_all_extents<_Tp>::type type;
};
diff --git a/libcxx/include/__type_traits/remove_const.h b/libcxx/include/__type_traits/remove_const.h
index 37315c5229ee8..a27cca677a0b1 100644
--- a/libcxx/include/__type_traits/remove_const.h
+++ b/libcxx/include/__type_traits/remove_const.h
@@ -27,11 +27,11 @@ template <class _Tp>
using __remove_const_t _LIBCPP_NODEBUG = __remove_const(_Tp);
#else
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS remove_const {
+struct [[__libcpp_template_vis]] remove_const {
typedef _Tp type;
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS remove_const<const _Tp> {
+struct [[__libcpp_template_vis]] remove_const<const _Tp> {
typedef _Tp type;
};
diff --git a/libcxx/include/__type_traits/remove_extent.h b/libcxx/include/__type_traits/remove_extent.h
index 636e392c9b107..6b36d391e76c7 100644
--- a/libcxx/include/__type_traits/remove_extent.h
+++ b/libcxx/include/__type_traits/remove_extent.h
@@ -28,15 +28,15 @@ template <class _Tp>
using __remove_extent_t _LIBCPP_NODEBUG = __remove_extent(_Tp);
#else
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS remove_extent {
+struct [[__libcpp_template_vis]] remove_extent {
typedef _Tp type;
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[]> {
+struct [[__libcpp_template_vis]] remove_extent<_Tp[]> {
typedef _Tp type;
};
template <class _Tp, size_t _Np>
-struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[_Np]> {
+struct [[__libcpp_template_vis]] remove_extent<_Tp[_Np]> {
typedef _Tp type;
};
diff --git a/libcxx/include/__type_traits/remove_pointer.h b/libcxx/include/__type_traits/remove_pointer.h
index 2f7ac151e9376..ed7121000251a 100644
--- a/libcxx/include/__type_traits/remove_pointer.h
+++ b/libcxx/include/__type_traits/remove_pointer.h
@@ -32,11 +32,11 @@ using __remove_pointer_t _LIBCPP_NODEBUG = __remove_pointer(_Tp);
# endif
#else
// clang-format off
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer {using type _LIBCPP_NODEBUG = _Tp;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp*> {using type _LIBCPP_NODEBUG = _Tp;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const> {using type _LIBCPP_NODEBUG = _Tp;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* volatile> {using type _LIBCPP_NODEBUG = _Tp;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {using type _LIBCPP_NODEBUG = _Tp;};
+template <class _Tp> struct [[__libcpp_template_vis]] remove_pointer {using type _LIBCPP_NODEBUG = _Tp;};
+template <class _Tp> struct [[__libcpp_template_vis]] remove_pointer<_Tp*> {using type _LIBCPP_NODEBUG = _Tp;};
+template <class _Tp> struct [[__libcpp_template_vis]] remove_pointer<_Tp* const> {using type _LIBCPP_NODEBUG = _Tp;};
+template <class _Tp> struct [[__libcpp_template_vis]] remove_pointer<_Tp* volatile> {using type _LIBCPP_NODEBUG = _Tp;};
+template <class _Tp> struct [[__libcpp_template_vis]] remove_pointer<_Tp* const volatile> {using type _LIBCPP_NODEBUG = _Tp;};
// clang-format on
template <class _Tp>
diff --git a/libcxx/include/__type_traits/remove_volatile.h b/libcxx/include/__type_traits/remove_volatile.h
index 5d73f7e5d241c..941817125fc88 100644
--- a/libcxx/include/__type_traits/remove_volatile.h
+++ b/libcxx/include/__type_traits/remove_volatile.h
@@ -27,11 +27,11 @@ template <class _Tp>
using __remove_volatile_t _LIBCPP_NODEBUG = __remove_volatile(_Tp);
#else
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS remove_volatile {
+struct [[__libcpp_template_vis]] remove_volatile {
typedef _Tp type;
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS remove_volatile<volatile _Tp> {
+struct [[__libcpp_template_vis]] remove_volatile<volatile _Tp> {
typedef _Tp type;
};
diff --git a/libcxx/include/__type_traits/result_of.h b/libcxx/include/__type_traits/result_of.h
index e6adec7f9c978..aeddd26c58c55 100644
--- a/libcxx/include/__type_traits/result_of.h
+++ b/libcxx/include/__type_traits/result_of.h
@@ -22,19 +22,19 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
template <class _Callable>
-struct _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_NO_SPECIALIZATIONS result_of;
+struct [[__libcpp_deprecated_in_cxx17()]] _LIBCPP_NO_SPECIALIZATIONS result_of;
_LIBCPP_DIAGNOSTIC_PUSH
#if __has_warning("-Winvalid-specialization")
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-specialization")
#endif
template <class _Fp, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)> : __invoke_result<_Fp, _Args...> {};
+struct [[__libcpp_template_vis]] result_of<_Fp(_Args...)> : __invoke_result<_Fp, _Args...> {};
_LIBCPP_DIAGNOSTIC_POP
# if _LIBCPP_STD_VER >= 14
template <class _Tp>
-using result_of_t _LIBCPP_DEPRECATED_IN_CXX17 = typename result_of<_Tp>::type;
+using result_of_t [[__libcpp_deprecated_in_cxx17()]] = typename result_of<_Tp>::type;
# endif // _LIBCPP_STD_VER >= 14
#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
diff --git a/libcxx/include/__utility/in_place.h b/libcxx/include/__utility/in_place.h
index 9b48446d83709..8b7887cdda236 100644
--- a/libcxx/include/__utility/in_place.h
+++ b/libcxx/include/__utility/in_place.h
@@ -28,14 +28,14 @@ struct _LIBCPP_EXPORTED_FROM_ABI in_place_t {
inline constexpr in_place_t in_place{};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS in_place_type_t {
+struct [[__libcpp_template_vis]] in_place_type_t {
_LIBCPP_HIDE_FROM_ABI explicit in_place_type_t() = default;
};
template <class _Tp>
inline constexpr in_place_type_t<_Tp> in_place_type{};
template <size_t _Idx>
-struct _LIBCPP_TEMPLATE_VIS in_place_index_t {
+struct [[__libcpp_template_vis]] in_place_index_t {
_LIBCPP_HIDE_FROM_ABI explicit in_place_index_t() = default;
};
template <size_t _Idx>
diff --git a/libcxx/include/__utility/integer_sequence.h b/libcxx/include/__utility/integer_sequence.h
index 2c1ff3c543e88..d677955b253a3 100644
--- a/libcxx/include/__utility/integer_sequence.h
+++ b/libcxx/include/__utility/integer_sequence.h
@@ -46,7 +46,7 @@ using __make_indices_imp _LIBCPP_NODEBUG =
#if _LIBCPP_STD_VER >= 14
template <class _Tp, _Tp... _Ip>
-struct _LIBCPP_TEMPLATE_VIS integer_sequence {
+struct [[__libcpp_template_vis]] integer_sequence {
typedef _Tp value_type;
static_assert(is_integral<_Tp>::value, "std::integer_sequence can only be instantiated with an integral type");
static _LIBCPP_HIDE_FROM_ABI constexpr size_t size() noexcept { return sizeof...(_Ip); }
diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h
index b4ac977f587a5..4e3249e8d021f 100644
--- a/libcxx/include/__utility/pair.h
+++ b/libcxx/include/__utility/pair.h
@@ -57,7 +57,7 @@ struct __non_trivially_copyable_base {
};
template <class _T1, class _T2>
-struct _LIBCPP_TEMPLATE_VIS pair
+struct [[__libcpp_template_vis]] pair
#if defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
: private __non_trivially_copyable_base<_T1, _T2>
#endif
@@ -535,20 +535,20 @@ make_pair(_T1&& __t1, _T2&& __t2) {
}
template <class _T1, class _T2>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<pair<_T1, _T2> > : public integral_constant<size_t, 2> {};
+struct [[__libcpp_template_vis]] tuple_size<pair<_T1, _T2> > : public integral_constant<size_t, 2> {};
template <size_t _Ip, class _T1, class _T2>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, pair<_T1, _T2> > {
+struct [[__libcpp_template_vis]] tuple_element<_Ip, pair<_T1, _T2> > {
static_assert(_Ip < 2, "Index out of bounds in std::tuple_element<std::pair<T1, T2>>");
};
template <class _T1, class _T2>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<0, pair<_T1, _T2> > {
+struct [[__libcpp_template_vis]] tuple_element<0, pair<_T1, _T2> > {
using type _LIBCPP_NODEBUG = _T1;
};
template <class _T1, class _T2>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<1, pair<_T1, _T2> > {
+struct [[__libcpp_template_vis]] tuple_element<1, pair<_T1, _T2> > {
using type _LIBCPP_NODEBUG = _T2;
};
diff --git a/libcxx/include/__utility/piecewise_construct.h b/libcxx/include/__utility/piecewise_construct.h
index 52b19d791e100..10ad5f9deb312 100644
--- a/libcxx/include/__utility/piecewise_construct.h
+++ b/libcxx/include/__utility/piecewise_construct.h
@@ -17,7 +17,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t {
+struct [[__libcpp_template_vis]] piecewise_construct_t {
explicit piecewise_construct_t() = default;
};
diff --git a/libcxx/include/__utility/rel_ops.h b/libcxx/include/__utility/rel_ops.h
index a8caf5bdeaf27..5526858345b3e 100644
--- a/libcxx/include/__utility/rel_ops.h
+++ b/libcxx/include/__utility/rel_ops.h
@@ -20,22 +20,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace rel_ops {
template <class _Tp>
-inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator!=(const _Tp& __x, const _Tp& __y) {
+[[__libcpp_deprecated_in_cxx20()]] _LIBCPP_HIDE_FROM_ABI inline bool operator!=(const _Tp& __x, const _Tp& __y) {
return !(__x == __y);
}
template <class _Tp>
-inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator>(const _Tp& __x, const _Tp& __y) {
+[[__libcpp_deprecated_in_cxx20()]] _LIBCPP_HIDE_FROM_ABI inline bool operator>(const _Tp& __x, const _Tp& __y) {
return __y < __x;
}
template <class _Tp>
-inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator<=(const _Tp& __x, const _Tp& __y) {
+[[__libcpp_deprecated_in_cxx20()]] _LIBCPP_HIDE_FROM_ABI inline bool operator<=(const _Tp& __x, const _Tp& __y) {
return !(__y < __x);
}
template <class _Tp>
-inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator>=(const _Tp& __x, const _Tp& __y) {
+[[__libcpp_deprecated_in_cxx20()]] _LIBCPP_HIDE_FROM_ABI inline bool operator>=(const _Tp& __x, const _Tp& __y) {
return !(__x < __y);
}
diff --git a/libcxx/include/__variant/monostate.h b/libcxx/include/__variant/monostate.h
index b29bbdf5cdbe4..75a7e8a7f7d20 100644
--- a/libcxx/include/__variant/monostate.h
+++ b/libcxx/include/__variant/monostate.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 17
-struct _LIBCPP_TEMPLATE_VIS monostate {};
+struct [[__libcpp_template_vis]] monostate {};
_LIBCPP_HIDE_FROM_ABI inline constexpr bool operator==(monostate, monostate) noexcept { return true; }
@@ -48,10 +48,10 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr bool operator>=(monostate, monostate) noe
# endif // _LIBCPP_STD_VER >= 20
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<monostate> {
+struct [[__libcpp_template_vis]] hash<monostate> {
# if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using argument_type _LIBCPP_DEPRECATED_IN_CXX17 = monostate;
- using result_type _LIBCPP_DEPRECATED_IN_CXX17 = size_t;
+ using argument_type [[__libcpp_deprecated_in_cxx17()]] = monostate;
+ using result_type [[__libcpp_deprecated_in_cxx17()]] = size_t;
# endif
inline _LIBCPP_HIDE_FROM_ABI size_t operator()(const monostate&) const noexcept {
diff --git a/libcxx/include/__vector/vector.h b/libcxx/include/__vector/vector.h
index 9155fb52a69b1..73c4f48ead013 100644
--- a/libcxx/include/__vector/vector.h
+++ b/libcxx/include/__vector/vector.h
@@ -84,7 +84,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _Allocator /* = allocator<_Tp> */>
-class _LIBCPP_TEMPLATE_VIS vector {
+class [[__libcpp_template_vis]] vector {
public:
//
// Types
diff --git a/libcxx/include/__vector/vector_bool.h b/libcxx/include/__vector/vector_bool.h
index 1d3960bd01597..1c939e7cd4f02 100644
--- a/libcxx/include/__vector/vector_bool.h
+++ b/libcxx/include/__vector/vector_bool.h
@@ -74,7 +74,7 @@ struct __has_storage_type<vector<bool, _Allocator> > {
};
template <class _Allocator>
-class _LIBCPP_TEMPLATE_VIS vector<bool, _Allocator> {
+class [[__libcpp_template_vis]] vector<bool, _Allocator> {
public:
typedef vector __self;
typedef bool value_type;
@@ -518,7 +518,7 @@ class _LIBCPP_TEMPLATE_VIS vector<bool, _Allocator> {
friend class __bit_iterator<vector, false>;
friend class __bit_iterator<vector, true>;
friend struct __bit_array<vector>;
- friend struct _LIBCPP_TEMPLATE_VIS hash<vector>;
+ friend struct hash<vector>;
};
template <class _Allocator>
@@ -1108,7 +1108,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t vector<bool, _Allocator>::__hash_code() con
}
template <class _Allocator>
-struct _LIBCPP_TEMPLATE_VIS hash<vector<bool, _Allocator> >
+struct [[__libcpp_template_vis]] hash<vector<bool, _Allocator> >
: public __unary_function<vector<bool, _Allocator>, size_t> {
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t
operator()(const vector<bool, _Allocator>& __vec) const _NOEXCEPT {
diff --git a/libcxx/include/__vector/vector_bool_formatter.h b/libcxx/include/__vector/vector_bool_formatter.h
index 017f9405e329b..e36ee63c6a05e 100644
--- a/libcxx/include/__vector/vector_bool_formatter.h
+++ b/libcxx/include/__vector/vector_bool_formatter.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, class _CharT>
// Since is-vector-bool-reference is only used once it's inlined here.
requires same_as<typename _Tp::__container, vector<bool, typename _Tp::__container::allocator_type>>
-struct _LIBCPP_TEMPLATE_VIS formatter<_Tp, _CharT> {
+struct [[__libcpp_template_vis]] formatter<_Tp, _CharT> {
private:
formatter<bool, _CharT> __underlying_;
diff --git a/libcxx/include/any b/libcxx/include/any
index b1df494d3db83..0e1e575706d82 100644
--- a/libcxx/include/any
+++ b/libcxx/include/any
@@ -139,7 +139,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
}
// Forward declarations
-class _LIBCPP_TEMPLATE_VIS any;
+class [[__libcpp_template_vis]] any;
template <class _ValueType>
_LIBCPP_HIDE_FROM_ABI add_pointer_t<add_const_t<_ValueType>> any_cast(any const*) _NOEXCEPT;
@@ -166,7 +166,7 @@ template <class _Tp>
struct _LargeHandler;
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS __unique_typeinfo {
+struct [[__libcpp_template_vis]] __unique_typeinfo {
static constexpr int __id = 0;
};
@@ -189,7 +189,7 @@ using _Handler _LIBCPP_NODEBUG = conditional_t< _IsSmallObject<_Tp>::value, _Sma
} // namespace __any_imp
-class _LIBCPP_TEMPLATE_VIS any {
+class any {
public:
// construct/destruct
_LIBCPP_HIDE_FROM_ABI constexpr any() _NOEXCEPT : __h_(nullptr) {}
@@ -316,7 +316,7 @@ private:
namespace __any_imp {
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _SmallHandler {
+struct [[__libcpp_template_vis]] _SmallHandler {
_LIBCPP_HIDE_FROM_ABI static void*
__handle(_Action __act, any const* __this, any* __other, type_info const* __info, const void* __fallback_info) {
switch (__act) {
@@ -383,7 +383,7 @@ private:
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS _LargeHandler {
+struct [[__libcpp_template_vis]] _LargeHandler {
_LIBCPP_HIDE_FROM_ABI static void*
__handle(_Action __act, any const* __this, any* __other, type_info const* __info, void const* __fallback_info) {
switch (__act) {
diff --git a/libcxx/include/array b/libcxx/include/array
index 44c6bb5c5cc93..d43538ff037b7 100644
--- a/libcxx/include/array
+++ b/libcxx/include/array
@@ -172,7 +172,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp, size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS array {
+struct [[__libcpp_template_vis]] array {
using __trivially_relocatable _LIBCPP_NODEBUG =
__conditional_t<__libcpp_is_trivially_relocatable<_Tp>::value, array, void>;
@@ -298,7 +298,7 @@ struct _LIBCPP_TEMPLATE_VIS array {
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> {
+struct [[__libcpp_template_vis]] array<_Tp, 0> {
// types:
using __self _LIBCPP_NODEBUG = array;
using value_type = _Tp;
@@ -492,10 +492,10 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void swap(array<_Tp,
}
template <class _Tp, size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<array<_Tp, _Size> > : public integral_constant<size_t, _Size> {};
+struct [[__libcpp_template_vis]] tuple_size<array<_Tp, _Size> > : public integral_constant<size_t, _Size> {};
template <size_t _Ip, class _Tp, size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> > {
+struct [[__libcpp_template_vis]] tuple_element<_Ip, array<_Tp, _Size> > {
static_assert(_Ip < _Size, "Index out of bounds in std::tuple_element<> (std::array)");
using type = _Tp;
};
diff --git a/libcxx/include/bitset b/libcxx/include/bitset
index f905b6f274e3f..9d360acb49fa1 100644
--- a/libcxx/include/bitset
+++ b/libcxx/include/bitset
@@ -601,12 +601,12 @@ inline _LIBCPP_CONSTEXPR __bitset<0, 0>::__bitset() _NOEXCEPT {}
inline _LIBCPP_CONSTEXPR __bitset<0, 0>::__bitset(unsigned long long) _NOEXCEPT {}
template <size_t _Size>
-class _LIBCPP_TEMPLATE_VIS bitset;
+class [[__libcpp_template_vis]] bitset;
template <size_t _Size>
struct hash<bitset<_Size> >;
template <size_t _Size>
-class _LIBCPP_TEMPLATE_VIS bitset
+class [[__libcpp_template_vis]] bitset
: private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size> {
public:
static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1;
@@ -952,7 +952,7 @@ operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT {
}
template <size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS hash<bitset<_Size> > : public __unary_function<bitset<_Size>, size_t> {
+struct [[__libcpp_template_vis]] hash<bitset<_Size> > : public __unary_function<bitset<_Size>, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(const bitset<_Size>& __bs) const _NOEXCEPT { return __bs.__hash_code(); }
};
diff --git a/libcxx/include/ccomplex b/libcxx/include/ccomplex
index ee7e088aac54d..5ac3a05fd4396 100644
--- a/libcxx/include/ccomplex
+++ b/libcxx/include/ccomplex
@@ -29,12 +29,12 @@
# if _LIBCPP_STD_VER >= 20
using __standard_header_ccomplex
- _LIBCPP_DEPRECATED_("removed in C++20. Include <complex> instead.") _LIBCPP_NODEBUG = void;
-using __use_standard_header_ccomplex _LIBCPP_NODEBUG = __standard_header_ccomplex;
+ [[__libcpp_deprecated("removed in C++20. Include <complex> instead.")]] _LIBCPP_NODEBUG = void;
+using __use_standard_header_ccomplex _LIBCPP_NODEBUG = __standard_header_ccomplex;
# elif _LIBCPP_STD_VER >= 17
-using __standard_header_ccomplex _LIBCPP_DEPRECATED_("Include <complex> instead.") _LIBCPP_NODEBUG = void;
+using __standard_header_ccomplex [[__libcpp_deprecated("Include <complex> instead.")]] _LIBCPP_NODEBUG = void;
using __use_standard_header_ccomplex _LIBCPP_NODEBUG = __standard_header_ccomplex;
# endif
diff --git a/libcxx/include/ciso646 b/libcxx/include/ciso646
index 34164362dc10d..b26ee6e1cc66a 100644
--- a/libcxx/include/ciso646
+++ b/libcxx/include/ciso646
@@ -27,8 +27,8 @@
# if _LIBCPP_STD_VER >= 20
using __standard_header_ciso646
- _LIBCPP_DEPRECATED_("removed in C++20. Include <version> instead.") _LIBCPP_NODEBUG = void;
-using __use_standard_header_ciso646 _LIBCPP_NODEBUG = __standard_header_ciso646;
+ [[__libcpp_deprecated("removed in C++20. Include <version> instead.")]] _LIBCPP_NODEBUG = void;
+using __use_standard_header_ciso646 _LIBCPP_NODEBUG = __standard_header_ciso646;
# endif
#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
diff --git a/libcxx/include/codecvt b/libcxx/include/codecvt
index 0526b8512175f..b91fcb1bec146 100644
--- a/libcxx/include/codecvt
+++ b/libcxx/include/codecvt
@@ -72,7 +72,7 @@ class codecvt_utf8_utf16
_LIBCPP_BEGIN_NAMESPACE_STD
-enum _LIBCPP_DEPRECATED_IN_CXX17 codecvt_mode { consume_header = 4, generate_header = 2, little_endian = 1 };
+enum [[__libcpp_deprecated_in_cxx17()]] codecvt_mode { consume_header = 4, generate_header = 2, little_endian = 1 };
// codecvt_utf8
@@ -196,7 +196,7 @@ protected:
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8 : public __codecvt_utf8<_Elem> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx17()]] codecvt_utf8 : public __codecvt_utf8<_Elem> {
public:
_LIBCPP_HIDE_FROM_ABI explicit codecvt_utf8(size_t __refs = 0) : __codecvt_utf8<_Elem>(__refs, _Maxcode, _Mode) {}
@@ -439,8 +439,8 @@ protected:
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS
-_LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf16 : public __codecvt_utf16<_Elem, _Mode & little_endian> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx17()]]
+codecvt_utf16 : public __codecvt_utf16<_Elem, _Mode & little_endian> {
public:
_LIBCPP_HIDE_FROM_ABI explicit codecvt_utf16(size_t __refs = 0)
: __codecvt_utf16<_Elem, _Mode & little_endian>(__refs, _Maxcode, _Mode) {}
@@ -571,7 +571,8 @@ protected:
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8_utf16 : public __codecvt_utf8_utf16<_Elem> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx17()]]
+codecvt_utf8_utf16 : public __codecvt_utf8_utf16<_Elem> {
public:
_LIBCPP_HIDE_FROM_ABI explicit codecvt_utf8_utf16(size_t __refs = 0)
: __codecvt_utf8_utf16<_Elem>(__refs, _Maxcode, _Mode) {}
diff --git a/libcxx/include/complex b/libcxx/include/complex
index df18159595b34..ac20f4858b9e9 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -283,7 +283,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS complex;
+class [[__libcpp_template_vis]] complex;
template <class _Tp, __enable_if_t<is_floating_point<_Tp>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
@@ -302,7 +302,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp>
operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS complex {
+class [[__libcpp_template_vis]] complex {
public:
typedef _Tp value_type;
@@ -393,9 +393,9 @@ public:
};
template <>
-class _LIBCPP_TEMPLATE_VIS complex<double>;
+class [[__libcpp_template_vis]] complex<double>;
template <>
-class _LIBCPP_TEMPLATE_VIS complex<long double>;
+class [[__libcpp_template_vis]] complex<long double>;
struct __from_builtin_tag {};
@@ -415,7 +415,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __complex_t<_Tp> __make_complex(_Tp __re
}
template <>
-class _LIBCPP_TEMPLATE_VIS complex<float> {
+class [[__libcpp_template_vis]] complex<float> {
float __re_;
float __im_;
@@ -512,7 +512,7 @@ public:
};
template <>
-class _LIBCPP_TEMPLATE_VIS complex<double> {
+class [[__libcpp_template_vis]] complex<double> {
double __re_;
double __im_;
@@ -612,7 +612,7 @@ public:
};
template <>
-class _LIBCPP_TEMPLATE_VIS complex<long double> {
+class [[__libcpp_template_vis]] complex<long double> {
long double __re_;
long double __im_;
diff --git a/libcxx/include/cstdalign b/libcxx/include/cstdalign
index 7f8dd1e1fbaf8..b1a1e507e728c 100644
--- a/libcxx/include/cstdalign
+++ b/libcxx/include/cstdalign
@@ -45,13 +45,13 @@ Macros:
# if _LIBCPP_STD_VER >= 20
-using __standard_header_cstdalign _LIBCPP_DEPRECATED_("removed in C++20.") _LIBCPP_NODEBUG = void;
+using __standard_header_cstdalign [[__libcpp_deprecated("removed in C++20.")]] _LIBCPP_NODEBUG = void;
using __use_standard_header_cstdalign _LIBCPP_NODEBUG = __standard_header_cstdalign;
# elif _LIBCPP_STD_VER >= 17
-using __standard_header_cstdalign _LIBCPP_DEPRECATED _LIBCPP_NODEBUG = void;
-using __use_standard_header_cstdalign _LIBCPP_NODEBUG = __standard_header_cstdalign;
+using __standard_header_cstdalign [[__libcpp_deprecated()]] _LIBCPP_NODEBUG = void;
+using __use_standard_header_cstdalign _LIBCPP_NODEBUG = __standard_header_cstdalign;
# endif
#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
diff --git a/libcxx/include/cstdbool b/libcxx/include/cstdbool
index a432d5f08b9ae..be68b7927ca7f 100644
--- a/libcxx/include/cstdbool
+++ b/libcxx/include/cstdbool
@@ -33,13 +33,13 @@ Macros:
# if _LIBCPP_STD_VER >= 20
-using __standard_header_cstdbool _LIBCPP_DEPRECATED_("removed in C++20.") _LIBCPP_NODEBUG = void;
-using __use_standard_header_cstdbool _LIBCPP_NODEBUG = __standard_header_cstdbool;
+using __standard_header_cstdbool [[__libcpp_deprecated("removed in C++20.")]] _LIBCPP_NODEBUG = void;
+using __use_standard_header_cstdbool _LIBCPP_NODEBUG = __standard_header_cstdbool;
# elif _LIBCPP_STD_VER >= 17
-using __standard_header_cstdbool _LIBCPP_DEPRECATED _LIBCPP_NODEBUG = void;
-using __use_standard_header_cstdbool _LIBCPP_NODEBUG = __standard_header_cstdbool;
+using __standard_header_cstdbool [[__libcpp_deprecated()]] _LIBCPP_NODEBUG = void;
+using __use_standard_header_cstdbool _LIBCPP_NODEBUG = __standard_header_cstdbool;
# endif
#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
diff --git a/libcxx/include/ctgmath b/libcxx/include/ctgmath
index db0786f1e2c46..4f6a718a66db1 100644
--- a/libcxx/include/ctgmath
+++ b/libcxx/include/ctgmath
@@ -31,12 +31,13 @@
# if _LIBCPP_STD_VER >= 20
using __standard_header_ctgmath
- _LIBCPP_DEPRECATED_("removed in C++20. Include <cmath> and <complex> instead.") _LIBCPP_NODEBUG = void;
+ [[__libcpp_deprecated("removed in C++20. Include <cmath> and <complex> instead.")]] _LIBCPP_NODEBUG = void;
using __use_standard_header_ctgmath _LIBCPP_NODEBUG = __standard_header_ctgmath;
# elif _LIBCPP_STD_VER >= 17
-using __standard_header_ctgmath _LIBCPP_DEPRECATED_("Include <cmath> and <complex> instead.") _LIBCPP_NODEBUG = void;
+using __standard_header_ctgmath [[__libcpp_deprecated("Include <cmath> and <complex> instead.")]] _LIBCPP_NODEBUG =
+ void;
using __use_standard_header_ctgmath _LIBCPP_NODEBUG = __standard_header_ctgmath;
# endif
diff --git a/libcxx/include/deque b/libcxx/include/deque
index 95200b4801d7f..b203f68a401ac 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -283,7 +283,7 @@ template <class _ValueType,
__deque_block_size<_ValueType, _DiffType>::value
# endif
>
-class _LIBCPP_TEMPLATE_VIS __deque_iterator {
+class [[__libcpp_template_vis]] __deque_iterator {
typedef _MapPointer __map_iterator;
public:
@@ -444,9 +444,9 @@ private:
__ptr_(__p) {}
template <class _Tp, class _Ap>
- friend class _LIBCPP_TEMPLATE_VIS deque;
+ friend class deque;
template <class _Vp, class _Pp, class _Rp, class _MP, class _Dp, _Dp>
- friend class _LIBCPP_TEMPLATE_VIS __deque_iterator;
+ friend class __deque_iterator;
template <class>
friend struct __segmented_iterator_traits;
@@ -486,7 +486,7 @@ const _DiffType __deque_iterator<_ValueType, _Pointer, _Reference, _MapPointer,
__deque_block_size<_ValueType, _DiffType>::value;
template <class _Tp, class _Allocator /*= allocator<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS deque {
+class [[__libcpp_template_vis]] deque {
public:
// types:
diff --git a/libcxx/include/experimental/type_traits b/libcxx/include/experimental/type_traits
index 0353526bc8f66..a031e44e73650 100644
--- a/libcxx/include/experimental/type_traits
+++ b/libcxx/include/experimental/type_traits
@@ -87,16 +87,16 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS
// 3.3.2, Other type transformations
/*
template <class>
-class _LIBCPP_TEMPLATE_VIS raw_invocation_type;
+class raw_invocation_type;
template <class _Fn, class ..._Args>
-class _LIBCPP_TEMPLATE_VIS raw_invocation_type<_Fn(_Args...)>;
+class raw_invocation_type<_Fn(_Args...)>;
template <class>
-class _LIBCPP_TEMPLATE_VIS invokation_type;
+class invokation_type;
template <class _Fn, class ..._Args>
-class _LIBCPP_TEMPLATE_VIS invokation_type<_Fn(_Args...)>;
+class invokation_type<_Fn(_Args...)>;
template <class _Tp>
using invokation_type_t = typename invokation_type<_Tp>::type;
diff --git a/libcxx/include/experimental/utility b/libcxx/include/experimental/utility
index 0c9b2b0c789ca..b94726b4e48a3 100644
--- a/libcxx/include/experimental/utility
+++ b/libcxx/include/experimental/utility
@@ -42,7 +42,7 @@ inline namespace fundamentals_v1 {
_LIBCPP_BEGIN_NAMESPACE_LFTS
-struct _LIBCPP_TEMPLATE_VIS erased_type {};
+struct [[__libcpp_template_vis]] erased_type {};
_LIBCPP_END_NAMESPACE_LFTS
diff --git a/libcxx/include/ext/__hash b/libcxx/include/ext/__hash
index 67f7e351756fb..ccaafe2582d20 100644
--- a/libcxx/include/ext/__hash
+++ b/libcxx/include/ext/__hash
@@ -20,64 +20,64 @@
namespace __gnu_cxx {
template <typename _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash {};
+struct [[__libcpp_template_vis]] hash {};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<const char*> : public std::__unary_function<const char*, size_t> {
+struct [[__libcpp_template_vis]] hash<const char*> : public std::__unary_function<const char*, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(const char* __c) const _NOEXCEPT {
return std::__do_string_hash(__c, __c + strlen(__c));
}
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char*> : public std::__unary_function<char*, size_t> {
+struct [[__libcpp_template_vis]] hash<char*> : public std::__unary_function<char*, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(char* __c) const _NOEXCEPT {
return std::__do_string_hash<const char*>(__c, __c + strlen(__c));
}
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char> : public std::__unary_function<char, size_t> {
+struct [[__libcpp_template_vis]] hash<char> : public std::__unary_function<char, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(char __c) const _NOEXCEPT { return __c; }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<signed char> : public std::__unary_function<signed char, size_t> {
+struct [[__libcpp_template_vis]] hash<signed char> : public std::__unary_function<signed char, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(signed char __c) const _NOEXCEPT { return __c; }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned char> : public std::__unary_function<unsigned char, size_t> {
+struct [[__libcpp_template_vis]] hash<unsigned char> : public std::__unary_function<unsigned char, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned char __c) const _NOEXCEPT { return __c; }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<short> : public std::__unary_function<short, size_t> {
+struct [[__libcpp_template_vis]] hash<short> : public std::__unary_function<short, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(short __c) const _NOEXCEPT { return __c; }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned short> : public std::__unary_function<unsigned short, size_t> {
+struct [[__libcpp_template_vis]] hash<unsigned short> : public std::__unary_function<unsigned short, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned short __c) const _NOEXCEPT { return __c; }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<int> : public std::__unary_function<int, size_t> {
+struct [[__libcpp_template_vis]] hash<int> : public std::__unary_function<int, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(int __c) const _NOEXCEPT { return __c; }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned int> : public std::__unary_function<unsigned int, size_t> {
+struct [[__libcpp_template_vis]] hash<unsigned int> : public std::__unary_function<unsigned int, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned int __c) const _NOEXCEPT { return __c; }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<long> : public std::__unary_function<long, size_t> {
+struct [[__libcpp_template_vis]] hash<long> : public std::__unary_function<long, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(long __c) const _NOEXCEPT { return __c; }
};
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned long> : public std::__unary_function<unsigned long, size_t> {
+struct [[__libcpp_template_vis]] hash<unsigned long> : public std::__unary_function<unsigned long, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned long __c) const _NOEXCEPT { return __c; }
};
} // namespace __gnu_cxx
diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map
index c0336620cf88f..d53bc17f484c7 100644
--- a/libcxx/include/ext/hash_map
+++ b/libcxx/include/ext/hash_map
@@ -338,7 +338,7 @@ public:
};
template <class _HashIterator>
-class _LIBCPP_TEMPLATE_VIS __hash_map_iterator {
+class [[__libcpp_template_vis]] __hash_map_iterator {
_HashIterator __i_;
typedef const typename _HashIterator::value_type::first_type key_type;
@@ -376,19 +376,19 @@ public:
}
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS hash_map;
+ friend class hash_map;
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS hash_multimap;
+ friend class hash_multimap;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+ friend class __hash_const_iterator;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+ friend class __hash_const_local_iterator;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
+ friend class __hash_map_const_iterator;
};
template <class _HashIterator>
-class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator {
+class [[__libcpp_template_vis]] __hash_map_const_iterator {
_HashIterator __i_;
typedef const typename _HashIterator::value_type::first_type key_type;
@@ -430,13 +430,13 @@ public:
}
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS hash_map;
+ friend class hash_map;
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS hash_multimap;
+ friend class hash_multimap;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+ friend class __hash_const_iterator;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+ friend class __hash_const_local_iterator;
};
template <class _Key,
@@ -444,7 +444,7 @@ template <class _Key,
class _Hash = hash<_Key>,
class _Pred = std::equal_to<_Key>,
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS hash_map {
+class [[__libcpp_template_vis]] hash_map {
public:
// types
typedef _Key key_type;
@@ -670,7 +670,7 @@ template <class _Key,
class _Hash = hash<_Key>,
class _Pred = std::equal_to<_Key>,
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS hash_multimap {
+class [[__libcpp_template_vis]] hash_multimap {
public:
// types
typedef _Key key_type;
diff --git a/libcxx/include/ext/hash_set b/libcxx/include/ext/hash_set
index 2f86649d6e983..e52a3d120a71a 100644
--- a/libcxx/include/ext/hash_set
+++ b/libcxx/include/ext/hash_set
@@ -219,7 +219,7 @@ template <class _Value,
class _Hash = hash<_Value>,
class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value> >
-class _LIBCPP_TEMPLATE_VIS hash_set {
+class [[__libcpp_template_vis]] hash_set {
public:
// types
typedef _Value key_type;
@@ -398,7 +398,7 @@ template <class _Value,
class _Hash = hash<_Value>,
class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value> >
-class _LIBCPP_TEMPLATE_VIS hash_multiset {
+class [[__libcpp_template_vis]] hash_multiset {
public:
// types
typedef _Value key_type;
diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list
index 8c688611d5ee2..34aaed33b48b7 100644
--- a/libcxx/include/forward_list
+++ b/libcxx/include/forward_list
@@ -351,12 +351,12 @@ public:
};
template <class _Tp, class _Alloc = allocator<_Tp> >
-class _LIBCPP_TEMPLATE_VIS forward_list;
+class [[__libcpp_template_vis]] forward_list;
template <class _NodeConstPtr>
-class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator;
+class [[__libcpp_template_vis]] __forward_list_const_iterator;
template <class _NodePtr>
-class _LIBCPP_TEMPLATE_VIS __forward_list_iterator {
+class [[__libcpp_template_vis]] __forward_list_iterator {
typedef __forward_node_traits<_NodePtr> __traits;
typedef typename __traits::__node_pointer __node_pointer;
typedef typename __traits::__begin_node_pointer __begin_node_pointer;
@@ -380,9 +380,9 @@ class _LIBCPP_TEMPLATE_VIS __forward_list_iterator {
: __ptr_(__traits::__as_iter_node(__p)) {}
template <class, class>
- friend class _LIBCPP_TEMPLATE_VIS forward_list;
+ friend class forward_list;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator;
+ friend class __forward_list_const_iterator;
public:
typedef forward_iterator_tag iterator_category;
@@ -417,7 +417,7 @@ public:
};
template <class _NodeConstPtr>
-class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator {
+class [[__libcpp_template_vis]] __forward_list_const_iterator {
static_assert(!is_const<typename pointer_traits<_NodeConstPtr>::element_type>::value, "");
typedef _NodeConstPtr _NodePtr;
@@ -640,7 +640,7 @@ void __forward_list_base<_Tp, _Alloc>::clear() _NOEXCEPT {
}
template <class _Tp, class _Alloc /*= allocator<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS forward_list : private __forward_list_base<_Tp, _Alloc> {
+class [[__libcpp_template_vis]] forward_list : private __forward_list_base<_Tp, _Alloc> {
typedef __forward_list_base<_Tp, _Alloc> __base;
typedef typename __base::__node_allocator __node_allocator;
typedef typename __base::__node_type __node_type;
diff --git a/libcxx/include/fstream b/libcxx/include/fstream
index 43e3741897aa1..27cb6b63900cc 100644
--- a/libcxx/include/fstream
+++ b/libcxx/include/fstream
@@ -225,7 +225,7 @@ _LIBCPP_EXPORTED_FROM_ABI void* __filebuf_windows_native_handle(FILE* __file) no
# endif
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_filebuf : public basic_streambuf<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_filebuf : public basic_streambuf<_CharT, _Traits> {
public:
typedef _CharT char_type;
typedef _Traits traits_type;
@@ -1095,7 +1095,7 @@ void basic_filebuf<_CharT, _Traits>::__write_mode() {
// basic_ifstream
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_ifstream : public basic_istream<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_ifstream : public basic_istream<_CharT, _Traits> {
public:
typedef _CharT char_type;
typedef _Traits traits_type;
@@ -1251,7 +1251,7 @@ inline void basic_ifstream<_CharT, _Traits>::close() {
// basic_ofstream
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_ofstream : public basic_ostream<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_ofstream : public basic_ostream<_CharT, _Traits> {
public:
typedef _CharT char_type;
typedef _Traits traits_type;
@@ -1410,7 +1410,7 @@ inline void basic_ofstream<_CharT, _Traits>::close() {
// basic_fstream
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_fstream : public basic_iostream<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_fstream : public basic_iostream<_CharT, _Traits> {
public:
typedef _CharT char_type;
typedef _Traits traits_type;
diff --git a/libcxx/include/future b/libcxx/include/future
index 22b387d3ba094..a4c376abbf3c4 100644
--- a/libcxx/include/future
+++ b/libcxx/include/future
@@ -427,11 +427,11 @@ _LIBCPP_DECLARE_STRONG_ENUM(future_errc){
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(future_errc)
template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<future_errc> : public true_type {};
+struct [[__libcpp_template_vis]] is_error_code_enum<future_errc> : public true_type {};
# ifdef _LIBCPP_CXX03_LANG
template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<future_errc::__lx> : public true_type {};
+struct [[__libcpp_template_vis]] is_error_code_enum<future_errc::__lx> : public true_type {};
# endif
// enum class launch
@@ -909,14 +909,14 @@ void __async_assoc_state<void, _Fp>::__on_zero_shared() _NOEXCEPT {
}
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS promise;
+class [[__libcpp_template_vis]] promise;
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS shared_future;
+class [[__libcpp_template_vis]] shared_future;
// future
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS future;
+class [[__libcpp_template_vis]] future;
template <class _Rp, class _Fp>
_LIBCPP_HIDE_FROM_ABI future<_Rp> __make_deferred_assoc_state(_Fp&& __f);
@@ -925,7 +925,7 @@ template <class _Rp, class _Fp>
_LIBCPP_HIDE_FROM_ABI future<_Rp> __make_async_assoc_state(_Fp&& __f);
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS future {
+class [[__libcpp_template_vis]] future {
__assoc_state<_Rp>* __state_;
explicit _LIBCPP_HIDE_FROM_ABI future(__assoc_state<_Rp>* __state);
@@ -996,7 +996,7 @@ _Rp future<_Rp>::get() {
}
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS future<_Rp&> {
+class [[__libcpp_template_vis]] future<_Rp&> {
__assoc_state<_Rp&>* __state_;
explicit _LIBCPP_HIDE_FROM_ABI future(__assoc_state<_Rp&>* __state);
@@ -1121,7 +1121,7 @@ template <class _Callable>
class packaged_task;
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS promise {
+class [[__libcpp_template_vis]] promise {
__assoc_state<_Rp>* __state_;
_LIBCPP_HIDE_FROM_ABI explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
@@ -1238,7 +1238,7 @@ void promise<_Rp>::set_exception_at_thread_exit(exception_ptr __p) {
// promise<R&>
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS promise<_Rp&> {
+class [[__libcpp_template_vis]] promise<_Rp&> {
__assoc_state<_Rp&>* __state_;
_LIBCPP_HIDE_FROM_ABI explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
@@ -1393,7 +1393,7 @@ inline _LIBCPP_HIDE_FROM_ABI void swap(promise<_Rp>& __x, promise<_Rp>& __y) _NO
}
template <class _Rp, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<promise<_Rp>, _Alloc> : public true_type {};
+struct [[__libcpp_template_vis]] uses_allocator<promise<_Rp>, _Alloc> : public true_type {};
// packaged_task
@@ -1612,9 +1612,9 @@ inline _Rp __packaged_task_function<_Rp(_ArgTypes...)>::operator()(_ArgTypes...
}
template <class _Rp, class... _ArgTypes>
-class _LIBCPP_TEMPLATE_VIS packaged_task<_Rp(_ArgTypes...)> {
+class [[__libcpp_template_vis]] packaged_task<_Rp(_ArgTypes...)> {
public:
- using result_type _LIBCPP_DEPRECATED = _Rp; // extension
+ using result_type [[__libcpp_deprecated()]] = _Rp; // extension
private:
__packaged_task_function<_Rp(_ArgTypes...)> __f_;
@@ -1706,9 +1706,9 @@ void packaged_task<_Rp(_ArgTypes...)>::reset() {
}
template <class... _ArgTypes>
-class _LIBCPP_TEMPLATE_VIS packaged_task<void(_ArgTypes...)> {
+class [[__libcpp_template_vis]] packaged_task<void(_ArgTypes...)> {
public:
- using result_type _LIBCPP_DEPRECATED = void; // extension
+ using result_type [[__libcpp_deprecated()]] = void; // extension
private:
__packaged_task_function<void(_ArgTypes...)> __f_;
@@ -1817,7 +1817,7 @@ swap(packaged_task<_Rp(_ArgTypes...)>& __x, packaged_task<_Rp(_ArgTypes...)>& __
# if _LIBCPP_STD_VER <= 14
template <class _Callable, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<packaged_task<_Callable>, _Alloc> : public true_type {};
+struct [[__libcpp_template_vis]] uses_allocator<packaged_task<_Callable>, _Alloc> : public true_type {};
# endif
template <class _Rp, class _Fp>
@@ -1901,7 +1901,7 @@ async(_Fp&& __f, _Args&&... __args) {
// shared_future
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS shared_future {
+class [[__libcpp_template_vis]] shared_future {
__assoc_state<_Rp>* __state_;
public:
@@ -1957,7 +1957,7 @@ shared_future<_Rp>& shared_future<_Rp>::operator=(const shared_future& __rhs) _N
}
template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS shared_future<_Rp&> {
+class [[__libcpp_template_vis]] shared_future<_Rp&> {
__assoc_state<_Rp&>* __state_;
public:
diff --git a/libcxx/include/initializer_list b/libcxx/include/initializer_list
index 3967ad8aaef7c..cfda7082b7bab 100644
--- a/libcxx/include/initializer_list
+++ b/libcxx/include/initializer_list
@@ -59,7 +59,7 @@ namespace std // purposefully not versioned
# ifndef _LIBCPP_CXX03_LANG
template <class _Ep>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS initializer_list {
+class [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS initializer_list {
const _Ep* __begin_;
size_t __size_;
diff --git a/libcxx/include/ios b/libcxx/include/ios
index 98a088266539a..83cbae95a7d4a 100644
--- a/libcxx/include/ios
+++ b/libcxx/include/ios
@@ -418,11 +418,11 @@ _LIBCPP_DECLARE_STRONG_ENUM(io_errc){stream = 1};
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(io_errc)
template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc> : public true_type {};
+struct [[__libcpp_template_vis]] is_error_code_enum<io_errc> : public true_type {};
# ifdef _LIBCPP_CXX03_LANG
template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc::__lx> : public true_type {};
+struct [[__libcpp_template_vis]] is_error_code_enum<io_errc::__lx> : public true_type {};
# endif
_LIBCPP_EXPORTED_FROM_ABI const error_category& iostream_category() _NOEXCEPT;
@@ -559,7 +559,7 @@ private:
};
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_ios : public ios_base {
+class [[__libcpp_template_vis]] basic_ios : public ios_base {
public:
// types:
typedef _CharT char_type;
diff --git a/libcxx/include/iosfwd b/libcxx/include/iosfwd
index 80f3e2d5cf2bc..3e155b95da033 100644
--- a/libcxx/include/iosfwd
+++ b/libcxx/include/iosfwd
@@ -127,12 +127,12 @@ using wosyncstream = basic_osyncstream<wchar_t>; // C++20
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
+class [[__libcpp_template_vis]] istreambuf_iterator;
template <class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator;
+class [[__libcpp_template_vis]] ostreambuf_iterator;
template <class _State>
-class _LIBCPP_TEMPLATE_VIS fpos;
+class [[__libcpp_template_vis]] fpos;
typedef fpos<mbstate_t> streampos;
# if _LIBCPP_HAS_WIDE_CHARACTERS
typedef fpos<mbstate_t> wstreampos;
diff --git a/libcxx/include/istream b/libcxx/include/istream
index 4b177c41cc325..4ded34c8a9f1d 100644
--- a/libcxx/include/istream
+++ b/libcxx/include/istream
@@ -189,7 +189,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_istream : virtual public basic_ios<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_istream : virtual public basic_ios<_CharT, _Traits> {
streamsize __gc_;
_LIBCPP_HIDE_FROM_ABI void __inc_gcount() {
@@ -228,7 +228,7 @@ public:
basic_istream& operator=(const basic_istream& __rhs) = delete;
// 27.7.1.1.3 Prefix/suffix:
- class _LIBCPP_TEMPLATE_VIS sentry;
+ class [[__libcpp_template_vis]] sentry;
// 27.7.1.2 Formatted input:
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 basic_istream& operator>>(basic_istream& (*__pf)(basic_istream&)) {
@@ -305,7 +305,7 @@ public:
};
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_istream<_CharT, _Traits>::sentry {
+class [[__libcpp_template_vis]] basic_istream<_CharT, _Traits>::sentry {
bool __ok_;
public:
@@ -1167,7 +1167,7 @@ _LIBCPP_HIDE_FROM_ABI _Stream&& operator>>(_Stream&& __is, _Tp&& __x) {
}
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_iostream
+class [[__libcpp_template_vis]] basic_iostream
: public basic_istream<_CharT, _Traits>,
public basic_ostream<_CharT, _Traits> {
public:
diff --git a/libcxx/include/limits b/libcxx/include/limits
index 1c1a0b29b7187..7f72f3be7eb04 100644
--- a/libcxx/include/limits
+++ b/libcxx/include/limits
@@ -128,7 +128,7 @@ enum float_round_style {
round_toward_neg_infinity = 3
};
-enum _LIBCPP_DEPRECATED_IN_CXX23 float_denorm_style {
+enum [[__libcpp_deprecated_in_cxx23()]] float_denorm_style {
denorm_indeterminate = -1,
denorm_absent = 0,
denorm_present = 1
@@ -159,11 +159,11 @@ protected:
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
- static _LIBCPP_CONSTEXPR const bool has_infinity = false;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+ static _LIBCPP_CONSTEXPR const bool has_infinity = false;
+ static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
+ static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return type(); }
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return type(); }
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return type(); }
@@ -216,11 +216,11 @@ protected:
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
- static _LIBCPP_CONSTEXPR const bool has_infinity = false;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+ static _LIBCPP_CONSTEXPR const bool has_infinity = false;
+ static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
+ static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return type(0); }
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return type(0); }
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return type(0); }
@@ -267,11 +267,11 @@ protected:
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
- static _LIBCPP_CONSTEXPR const bool has_infinity = false;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+ static _LIBCPP_CONSTEXPR const bool has_infinity = false;
+ static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
+ static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return type(0); }
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return type(0); }
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return type(0); }
@@ -312,11 +312,11 @@ protected:
static _LIBCPP_CONSTEXPR const int max_exponent = __FLT_MAX_EXP__;
static _LIBCPP_CONSTEXPR const int max_exponent10 = __FLT_MAX_10_EXP__;
- static _LIBCPP_CONSTEXPR const bool has_infinity = true;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+ static _LIBCPP_CONSTEXPR const bool has_infinity = true;
+ static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
+ static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {
return __builtin_huge_valf();
}
@@ -369,11 +369,11 @@ protected:
static _LIBCPP_CONSTEXPR const int max_exponent = __DBL_MAX_EXP__;
static _LIBCPP_CONSTEXPR const int max_exponent10 = __DBL_MAX_10_EXP__;
- static _LIBCPP_CONSTEXPR const bool has_infinity = true;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+ static _LIBCPP_CONSTEXPR const bool has_infinity = true;
+ static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
+ static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {
return __builtin_huge_val();
}
@@ -426,11 +426,11 @@ protected:
static _LIBCPP_CONSTEXPR const int max_exponent = __LDBL_MAX_EXP__;
static _LIBCPP_CONSTEXPR const int max_exponent10 = __LDBL_MAX_10_EXP__;
- static _LIBCPP_CONSTEXPR const bool has_infinity = true;
- static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
- static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
- static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+ static _LIBCPP_CONSTEXPR const bool has_infinity = true;
+ static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
+ static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
+ [[__libcpp_deprecated_in_cxx23()]] static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {
return __builtin_huge_vall();
}
@@ -462,7 +462,7 @@ protected:
};
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS numeric_limits : private __libcpp_numeric_limits<_Tp> {
+class [[__libcpp_template_vis]] numeric_limits : private __libcpp_numeric_limits<_Tp> {
typedef __libcpp_numeric_limits<_Tp> __base;
typedef typename __base::type type;
@@ -495,8 +495,10 @@ public:
static inline _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
static inline _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
- static inline _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
- static inline _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+ [[__libcpp_deprecated_in_cxx23()]]
+ static inline _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
+ [[__libcpp_deprecated_in_cxx23()]]
+ static inline _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
_LIBCPP_SUPPRESS_DEPRECATED_POP
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {
return __base::infinity();
@@ -521,13 +523,13 @@ public:
};
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS numeric_limits<const _Tp> : public numeric_limits<_Tp> {};
+class [[__libcpp_template_vis]] numeric_limits<const _Tp> : public numeric_limits<_Tp> {};
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS numeric_limits<volatile _Tp> : public numeric_limits<_Tp> {};
+class [[__libcpp_template_vis]] numeric_limits<volatile _Tp> : public numeric_limits<_Tp> {};
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS numeric_limits<const volatile _Tp> : public numeric_limits<_Tp> {};
+class [[__libcpp_template_vis]] numeric_limits<const volatile _Tp> : public numeric_limits<_Tp> {};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/list b/libcxx/include/list
index 1285174f1c384..5ec55fc888e38 100644
--- a/libcxx/include/list
+++ b/libcxx/include/list
@@ -345,14 +345,14 @@ public:
};
template <class _Tp, class _Alloc = allocator<_Tp> >
-class _LIBCPP_TEMPLATE_VIS list;
+class [[__libcpp_template_vis]] list;
template <class _Tp, class _Alloc>
class __list_imp;
template <class _Tp, class _VoidPtr>
-class _LIBCPP_TEMPLATE_VIS __list_const_iterator;
+class [[__libcpp_template_vis]] __list_const_iterator;
template <class _Tp, class _VoidPtr>
-class _LIBCPP_TEMPLATE_VIS __list_iterator {
+class [[__libcpp_template_vis]] __list_iterator {
typedef __list_node_pointer_traits<_Tp, _VoidPtr> _NodeTraits;
typedef typename _NodeTraits::__base_pointer __base_pointer;
@@ -410,7 +410,7 @@ public:
};
template <class _Tp, class _VoidPtr>
-class _LIBCPP_TEMPLATE_VIS __list_const_iterator {
+class [[__libcpp_template_vis]] __list_const_iterator {
typedef __list_node_pointer_traits<_Tp, _VoidPtr> _NodeTraits;
typedef typename _NodeTraits::__base_pointer __base_pointer;
@@ -660,7 +660,7 @@ void __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
}
template <class _Tp, class _Alloc /*= allocator<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS list : private __list_imp<_Tp, _Alloc> {
+class [[__libcpp_template_vis]] list : private __list_imp<_Tp, _Alloc> {
typedef __list_imp<_Tp, _Alloc> __base;
typedef typename __base::__node_type __node_type;
typedef typename __base::__node_allocator __node_allocator;
diff --git a/libcxx/include/locale b/libcxx/include/locale
index 713f84ee4827a..f15710bffb1cf 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -570,7 +570,7 @@ extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<wchar_t>;
# endif
template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS num_get : public locale::facet, private __num_get<_CharT> {
+class [[__libcpp_template_vis]] num_get : public locale::facet, private __num_get<_CharT> {
public:
typedef _CharT char_type;
typedef _InputIterator iter_type;
@@ -1169,7 +1169,7 @@ extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<wchar_t>;
# endif
template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS num_put : public locale::facet, private __num_put<_CharT> {
+class [[__libcpp_template_vis]] num_put : public locale::facet, private __num_put<_CharT> {
public:
typedef _CharT char_type;
typedef _OutputIterator iter_type;
@@ -1451,7 +1451,7 @@ public:
};
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS __time_get_c_storage {
+class [[__libcpp_template_vis]] __time_get_c_storage {
protected:
typedef basic_string<_CharT> string_type;
@@ -1499,7 +1499,7 @@ _LIBCPP_EXPORTED_FROM_ABI const wstring& __time_get_c_storage<wchar_t>::__X() co
# endif
template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS time_get : public locale::facet, public time_base, private __time_get_c_storage<_CharT> {
+class [[__libcpp_template_vis]] time_get : public locale::facet, public time_base, private __time_get_c_storage<_CharT> {
public:
typedef _CharT char_type;
typedef _InputIterator iter_type;
@@ -1964,7 +1964,7 @@ protected:
};
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS __time_get_storage : public __time_get {
+class [[__libcpp_template_vis]] __time_get_storage : public __time_get {
protected:
typedef basic_string<_CharT> string_type;
@@ -2016,7 +2016,7 @@ _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(wchar_t)
# undef _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION
template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS time_get_byname
+class [[__libcpp_template_vis]] time_get_byname
: public time_get<_CharT, _InputIterator>,
private __time_get_storage<_CharT> {
public:
@@ -2065,7 +2065,7 @@ protected:
};
template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS time_put : public locale::facet, private __time_put {
+class [[__libcpp_template_vis]] time_put : public locale::facet, private __time_put {
public:
typedef _CharT char_type;
typedef _OutputIterator iter_type;
@@ -2140,7 +2140,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<wchar_t>;
# endif
template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS time_put_byname : public time_put<_CharT, _OutputIterator> {
+class [[__libcpp_template_vis]] time_put_byname : public time_put<_CharT, _OutputIterator> {
public:
_LIBCPP_HIDE_FROM_ABI explicit time_put_byname(const char* __nm, size_t __refs = 0)
: time_put<_CharT, _OutputIterator>(__nm, __refs) {}
@@ -2172,7 +2172,7 @@ public:
// moneypunct
template <class _CharT, bool _International = false>
-class _LIBCPP_TEMPLATE_VIS moneypunct : public locale::facet, public money_base {
+class [[__libcpp_template_vis]] moneypunct : public locale::facet, public money_base {
public:
typedef _CharT char_type;
typedef basic_string<char_type> string_type;
@@ -2228,7 +2228,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, true>
// moneypunct_byname
template <class _CharT, bool _International = false>
-class _LIBCPP_TEMPLATE_VIS moneypunct_byname : public moneypunct<_CharT, _International> {
+class [[__libcpp_template_vis]] moneypunct_byname : public moneypunct<_CharT, _International> {
public:
typedef money_base::pattern pattern;
typedef _CharT char_type;
@@ -2351,7 +2351,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<wchar_t>;
# endif
template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS money_get : public locale::facet, private __money_get<_CharT> {
+class [[__libcpp_template_vis]] money_get : public locale::facet, private __money_get<_CharT> {
public:
typedef _CharT char_type;
typedef _InputIterator iter_type;
@@ -2843,7 +2843,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<wchar_t>;
# endif
template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS money_put : public locale::facet, private __money_put<_CharT> {
+class [[__libcpp_template_vis]] money_put : public locale::facet, private __money_put<_CharT> {
public:
typedef _CharT char_type;
typedef _OutputIterator iter_type;
@@ -2998,7 +2998,7 @@ public:
};
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS messages : public locale::facet, public messages_base {
+class [[__libcpp_template_vis]] messages : public locale::facet, public messages_base {
public:
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
@@ -3074,7 +3074,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<wchar_t>;
# endif
template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS messages_byname : public messages<_CharT> {
+class [[__libcpp_template_vis]] messages_byname : public messages<_CharT> {
public:
typedef messages_base::catalog catalog;
typedef basic_string<_CharT> string_type;
@@ -3098,7 +3098,7 @@ template <class _Codecvt,
class _Elem = wchar_t,
class _WideAlloc = allocator<_Elem>,
class _ByteAlloc = allocator<char> >
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx17()]] wstring_convert {
public:
typedef basic_string<char, char_traits<char>, _ByteAlloc> byte_string;
typedef basic_string<_Elem, char_traits<_Elem>, _WideAlloc> wide_string;
@@ -3309,7 +3309,7 @@ wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::to_bytes(const _Elem*
}
template <class _Codecvt, class _Elem = wchar_t, class _Tr = char_traits<_Elem> >
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wbuffer_convert : public basic_streambuf<_Elem, _Tr> {
+class [[__libcpp_template_vis, __libcpp_deprecated_in_cxx17()]] wbuffer_convert : public basic_streambuf<_Elem, _Tr> {
public:
// types:
typedef _Elem char_type;
diff --git a/libcxx/include/map b/libcxx/include/map
index 37a8ec91b8f1f..90691d44ab33c 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -858,7 +858,7 @@ struct __extract_key_value_types<__value_type<_Key, _Tp> > {
};
template <class _TreeIterator>
-class _LIBCPP_TEMPLATE_VIS __map_iterator {
+class [[__libcpp_template_vis]] __map_iterator {
typedef typename _TreeIterator::_NodeTypes _NodeTypes;
typedef typename _TreeIterator::__pointer_traits __pointer_traits;
@@ -906,15 +906,15 @@ public:
}
template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS map;
+ friend class map;
template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS multimap;
+ friend class multimap;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
+ friend class __map_const_iterator;
};
template <class _TreeIterator>
-class _LIBCPP_TEMPLATE_VIS __map_const_iterator {
+class [[__libcpp_template_vis]] __map_const_iterator {
typedef typename _TreeIterator::_NodeTypes _NodeTypes;
typedef typename _TreeIterator::__pointer_traits __pointer_traits;
@@ -964,15 +964,15 @@ public:
}
template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS map;
+ friend class map;
template <class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS multimap;
+ friend class multimap;
template <class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
+ friend class __tree_const_iterator;
};
template <class _Key, class _Tp, class _Compare = less<_Key>, class _Allocator = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS map {
+class [[__libcpp_template_vis]] map {
public:
// types:
typedef _Key key_type;
@@ -986,7 +986,7 @@ public:
static_assert(is_same<typename allocator_type::value_type, value_type>::value,
"Allocator::value_type must be same type as value_type");
- class _LIBCPP_TEMPLATE_VIS value_compare : public __binary_function<value_type, value_type, bool> {
+ class [[__libcpp_template_vis]] value_compare : public __binary_function<value_type, value_type, bool> {
friend class map;
protected:
@@ -1028,9 +1028,9 @@ public:
# endif
template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS map;
+ friend class map;
template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS multimap;
+ friend class multimap;
_LIBCPP_HIDE_FROM_ABI map() _NOEXCEPT_(
is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_default_constructible<key_compare>::value&&
@@ -1657,7 +1657,7 @@ struct __container_traits<map<_Key, _Tp, _Compare, _Allocator> > {
};
template <class _Key, class _Tp, class _Compare = less<_Key>, class _Allocator = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS multimap {
+class [[__libcpp_template_vis]] multimap {
public:
// types:
typedef _Key key_type;
@@ -1672,7 +1672,7 @@ public:
static_assert(is_same<typename allocator_type::value_type, value_type>::value,
"Allocator::value_type must be same type as value_type");
- class _LIBCPP_TEMPLATE_VIS value_compare : public __binary_function<value_type, value_type, bool> {
+ class [[__libcpp_template_vis]] value_compare : public __binary_function<value_type, value_type, bool> {
friend class multimap;
protected:
@@ -1711,9 +1711,9 @@ public:
# endif
template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS map;
+ friend class map;
template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS multimap;
+ friend class multimap;
_LIBCPP_HIDE_FROM_ABI multimap() _NOEXCEPT_(
is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_default_constructible<key_compare>::value&&
diff --git a/libcxx/include/mutex b/libcxx/include/mutex
index 9b128e8710aae..9e663d10f356f 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -423,10 +423,10 @@ inline _LIBCPP_HIDE_FROM_ABI void lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&...
# if _LIBCPP_STD_VER >= 17
template <class... _Mutexes>
-class _LIBCPP_TEMPLATE_VIS scoped_lock;
+class [[__libcpp_template_vis]] scoped_lock;
template <>
-class _LIBCPP_TEMPLATE_VIS scoped_lock<> {
+class [[__libcpp_template_vis]] scoped_lock<> {
public:
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI explicit scoped_lock() {}
~scoped_lock() = default;
@@ -438,7 +438,7 @@ public:
};
template <class _Mutex>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) scoped_lock<_Mutex> {
+class [[__libcpp_template_vis]] _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) scoped_lock<_Mutex> {
public:
typedef _Mutex mutex_type;
@@ -463,7 +463,7 @@ public:
};
template <class... _MArgs>
-class _LIBCPP_TEMPLATE_VIS scoped_lock {
+class [[__libcpp_template_vis]] scoped_lock {
static_assert(sizeof...(_MArgs) > 1, "At least 2 lock types required");
typedef tuple<_MArgs&...> _MutexTuple;
diff --git a/libcxx/include/optional b/libcxx/include/optional
index 294c3ddf993fa..ccaf61e6452b8 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -1268,10 +1268,10 @@ _LIBCPP_HIDE_FROM_ABI constexpr optional<_Tp> make_optional(initializer_list<_Up
}
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash< __enable_hash_helper<optional<_Tp>, remove_const_t<_Tp>> > {
+struct [[__libcpp_template_vis]] hash< __enable_hash_helper<optional<_Tp>, remove_const_t<_Tp>> > {
# if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- _LIBCPP_DEPRECATED_IN_CXX17 typedef optional<_Tp> argument_type;
- _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t result_type;
+ [[__libcpp_deprecated_in_cxx17()]] typedef optional<_Tp> argument_type;
+ [[__libcpp_deprecated_in_cxx17()]] typedef size_t result_type;
# endif
_LIBCPP_HIDE_FROM_ABI size_t operator()(const optional<_Tp>& __opt) const {
diff --git a/libcxx/include/queue b/libcxx/include/queue
index ff69d75591deb..558f907a62065 100644
--- a/libcxx/include/queue
+++ b/libcxx/include/queue
@@ -299,7 +299,7 @@ template <class _Tp, class _Container>
_LIBCPP_HIDE_FROM_ABI bool operator<(const queue<_Tp, _Container>& __x, const queue<_Tp, _Container>& __y);
template <class _Tp, class _Container /*= deque<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS queue {
+class [[__libcpp_template_vis]] queue {
public:
typedef _Container container_type;
typedef typename container_type::value_type value_type;
@@ -510,11 +510,11 @@ inline _LIBCPP_HIDE_FROM_ABI void swap(queue<_Tp, _Container>& __x, queue<_Tp, _
}
template <class _Tp, class _Container, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<queue<_Tp, _Container>, _Alloc> : public uses_allocator<_Container, _Alloc> {
-};
+struct [[__libcpp_template_vis]]
+uses_allocator<queue<_Tp, _Container>, _Alloc> : public uses_allocator<_Container, _Alloc> {};
template <class _Tp, class _Container, class _Compare>
-class _LIBCPP_TEMPLATE_VIS priority_queue {
+class [[__libcpp_template_vis]] priority_queue {
public:
typedef _Container container_type;
typedef _Compare value_compare;
@@ -942,7 +942,7 @@ swap(priority_queue<_Tp, _Container, _Compare>& __x, priority_queue<_Tp, _Contai
}
template <class _Tp, class _Container, class _Compare, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc>
+struct [[__libcpp_template_vis]] uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc>
: public uses_allocator<_Container, _Alloc> {};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/ratio b/libcxx/include/ratio
index 2b5e34cbcd182..acd4f97a70c5d 100644
--- a/libcxx/include/ratio
+++ b/libcxx/include/ratio
@@ -229,7 +229,7 @@ public:
};
template <intmax_t _Num, intmax_t _Den = 1>
-class _LIBCPP_TEMPLATE_VIS ratio {
+class [[__libcpp_template_vis]] ratio {
static_assert(__static_abs<_Num> >= 0, "ratio numerator is out of range");
static_assert(_Den != 0, "ratio divide by 0");
static_assert(__static_abs<_Den> > 0, "ratio denominator is out of range");
@@ -290,7 +290,7 @@ using ratio_multiply = typename __ratio_multiply<_R1, _R2>::type;
# else // _LIBCPP_CXX03_LANG
template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_multiply : public __ratio_multiply<_R1, _R2>::type {};
+struct [[__libcpp_template_vis]] ratio_multiply : public __ratio_multiply<_R1, _R2>::type {};
# endif // _LIBCPP_CXX03_LANG
@@ -316,7 +316,7 @@ using ratio_divide = typename __ratio_divide<_R1, _R2>::type;
# else // _LIBCPP_CXX03_LANG
template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_divide : public __ratio_divide<_R1, _R2>::type {};
+struct [[__libcpp_template_vis]] ratio_divide : public __ratio_divide<_R1, _R2>::type {};
# endif // _LIBCPP_CXX03_LANG
@@ -345,7 +345,7 @@ using ratio_add = typename __ratio_add<_R1, _R2>::type;
# else // _LIBCPP_CXX03_LANG
template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_add : public __ratio_add<_R1, _R2>::type {};
+struct [[__libcpp_template_vis]] ratio_add : public __ratio_add<_R1, _R2>::type {};
# endif // _LIBCPP_CXX03_LANG
@@ -374,20 +374,20 @@ using ratio_subtract = typename __ratio_subtract<_R1, _R2>::type;
# else // _LIBCPP_CXX03_LANG
template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_subtract : public __ratio_subtract<_R1, _R2>::type {};
+struct [[__libcpp_template_vis]] ratio_subtract : public __ratio_subtract<_R1, _R2>::type {};
# endif // _LIBCPP_CXX03_LANG
// ratio_equal
template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_equal : _BoolConstant<(_R1::num == _R2::num && _R1::den == _R2::den)> {
+struct [[__libcpp_template_vis]] ratio_equal : _BoolConstant<(_R1::num == _R2::num && _R1::den == _R2::den)> {
static_assert(__is_ratio_v<_R1>, "[ratio.general]/2 requires R1 to be a specialisation of the ratio template");
static_assert(__is_ratio_v<_R2>, "[ratio.general]/2 requires R2 to be a specialisation of the ratio template");
};
template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_not_equal : _BoolConstant<!ratio_equal<_R1, _R2>::value> {
+struct [[__libcpp_template_vis]] ratio_not_equal : _BoolConstant<!ratio_equal<_R1, _R2>::value> {
static_assert(__is_ratio_v<_R1>, "[ratio.general]/2 requires R1 to be a specialisation of the ratio template");
static_assert(__is_ratio_v<_R2>, "[ratio.general]/2 requires R2 to be a specialisation of the ratio template");
};
@@ -441,25 +441,25 @@ struct __ratio_less<_R1, _R2, -1LL, -1LL> {
};
template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_less : _BoolConstant<__ratio_less<_R1, _R2>::value> {
+struct [[__libcpp_template_vis]] ratio_less : _BoolConstant<__ratio_less<_R1, _R2>::value> {
static_assert(__is_ratio_v<_R1>, "[ratio.general]/2 requires R1 to be a specialisation of the ratio template");
static_assert(__is_ratio_v<_R2>, "[ratio.general]/2 requires R2 to be a specialisation of the ratio template");
};
template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_less_equal : _BoolConstant<!ratio_less<_R2, _R1>::value> {
+struct [[__libcpp_template_vis]] ratio_less_equal : _BoolConstant<!ratio_less<_R2, _R1>::value> {
static_assert(__is_ratio_v<_R1>, "[ratio.general]/2 requires R1 to be a specialisation of the ratio template");
static_assert(__is_ratio_v<_R2>, "[ratio.general]/2 requires R2 to be a specialisation of the ratio template");
};
template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_greater : _BoolConstant<ratio_less<_R2, _R1>::value> {
+struct [[__libcpp_template_vis]] ratio_greater : _BoolConstant<ratio_less<_R2, _R1>::value> {
static_assert(__is_ratio_v<_R1>, "[ratio.general]/2 requires R1 to be a specialisation of the ratio template");
static_assert(__is_ratio_v<_R2>, "[ratio.general]/2 requires R2 to be a specialisation of the ratio template");
};
template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_greater_equal : _BoolConstant<!ratio_less<_R1, _R2>::value> {
+struct [[__libcpp_template_vis]] ratio_greater_equal : _BoolConstant<!ratio_less<_R1, _R2>::value> {
static_assert(__is_ratio_v<_R1>, "[ratio.general]/2 requires R1 to be a specialisation of the ratio template");
static_assert(__is_ratio_v<_R2>, "[ratio.general]/2 requires R2 to be a specialisation of the ratio template");
};
diff --git a/libcxx/include/regex b/libcxx/include/regex
index eebd68af54297..336b158e4b0c3 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -996,7 +996,7 @@ template <regex_constants::error_type _Ev>
}
template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS regex_traits {
+struct [[__libcpp_template_vis]] regex_traits {
public:
typedef _CharT char_type;
typedef basic_string<char_type> string_type;
@@ -1305,10 +1305,10 @@ template <class _CharT>
class __node;
template <class _BidirectionalIterator>
-class _LIBCPP_TEMPLATE_VIS sub_match;
+class [[__libcpp_template_vis]] sub_match;
template <class _BidirectionalIterator, class _Allocator = allocator<sub_match<_BidirectionalIterator> > >
-class _LIBCPP_TEMPLATE_VIS match_results;
+class [[__libcpp_template_vis]] match_results;
template <class _CharT>
struct __state {
@@ -2263,7 +2263,7 @@ template <class _CharT, class _Traits>
class __lookahead;
template <class _CharT, class _Traits = regex_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_regex;
+class [[__libcpp_template_vis]] basic_regex;
typedef basic_regex<char> regex;
# if _LIBCPP_HAS_WIDE_CHARACTERS
@@ -2271,7 +2271,7 @@ typedef basic_regex<wchar_t> wregex;
# endif
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_PREFERRED_NAME(regex)
+class [[__libcpp_template_vis]] _LIBCPP_PREFERRED_NAME(regex)
_LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wregex)) basic_regex {
public:
// types:
@@ -4191,7 +4191,7 @@ typedef sub_match<wstring::const_iterator> wssub_match;
# endif
template <class _BidirectionalIterator>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_PREFERRED_NAME(csub_match)
+class [[__libcpp_template_vis]] _LIBCPP_PREFERRED_NAME(csub_match)
_LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wcsub_match)) _LIBCPP_PREFERRED_NAME(ssub_match)
_LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wssub_match)) sub_match
: public pair<_BidirectionalIterator, _BidirectionalIterator> {
@@ -4537,7 +4537,7 @@ typedef match_results<wstring::const_iterator> wsmatch;
# endif
template <class _BidirectionalIterator, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_PREFERRED_NAME(cmatch) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wcmatch))
+class [[__libcpp_template_vis]] _LIBCPP_PREFERRED_NAME(cmatch) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wcmatch))
_LIBCPP_PREFERRED_NAME(smatch) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wsmatch)) match_results {
public:
typedef _Allocator allocator_type;
@@ -5322,7 +5322,7 @@ regex_match(const basic_string<_CharT, _ST, _SA>& __s,
template <class _BidirectionalIterator,
class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type,
class _Traits = regex_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS regex_iterator;
+class [[__libcpp_template_vis]] regex_iterator;
typedef regex_iterator<const char*> cregex_iterator;
typedef regex_iterator<string::const_iterator> sregex_iterator;
@@ -5332,7 +5332,7 @@ typedef regex_iterator<wstring::const_iterator> wsregex_iterator;
# endif
template <class _BidirectionalIterator, class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_PREFERRED_NAME(cregex_iterator)
+class [[__libcpp_template_vis]] _LIBCPP_PREFERRED_NAME(cregex_iterator)
_LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wcregex_iterator)) _LIBCPP_PREFERRED_NAME(sregex_iterator)
_LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wsregex_iterator)) regex_iterator {
public:
@@ -5452,7 +5452,7 @@ regex_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++() {
template <class _BidirectionalIterator,
class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type,
class _Traits = regex_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS regex_token_iterator;
+class [[__libcpp_template_vis]] regex_token_iterator;
typedef regex_token_iterator<const char*> cregex_token_iterator;
typedef regex_token_iterator<string::const_iterator> sregex_token_iterator;
@@ -5462,7 +5462,7 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
# endif
template <class _BidirectionalIterator, class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_PREFERRED_NAME(cregex_token_iterator)
+class [[__libcpp_template_vis]] _LIBCPP_PREFERRED_NAME(cregex_token_iterator)
_LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wcregex_token_iterator))
_LIBCPP_PREFERRED_NAME(sregex_token_iterator)
_LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wsregex_token_iterator)) regex_token_iterator {
diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator
index 94a35f64603ba..7d845124ce208 100644
--- a/libcxx/include/scoped_allocator
+++ b/libcxx/include/scoped_allocator
@@ -334,7 +334,7 @@ struct __outermost<_Alloc, true> {
};
template <class _OuterAlloc, class... _InnerAllocs>
-class _LIBCPP_TEMPLATE_VIS scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...>
+class [[__libcpp_template_vis]] scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...>
: public __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...> {
typedef __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...> _Base;
typedef allocator_traits<_OuterAlloc> _OuterTraits;
diff --git a/libcxx/include/set b/libcxx/include/set
index bd7bfef1f3e29..13c0bf8ea4b97 100644
--- a/libcxx/include/set
+++ b/libcxx/include/set
@@ -573,7 +573,7 @@ template <class _Key, class _Compare, class _Allocator>
class multiset;
template <class _Key, class _Compare = less<_Key>, class _Allocator = allocator<_Key> >
-class _LIBCPP_TEMPLATE_VIS set {
+class [[__libcpp_template_vis]] set {
public:
// types:
typedef _Key key_type;
@@ -611,9 +611,9 @@ public:
# endif
template <class _Key2, class _Compare2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS set;
+ friend class set;
template <class _Key2, class _Compare2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS multiset;
+ friend class multiset;
_LIBCPP_HIDE_FROM_ABI set() _NOEXCEPT_(
is_nothrow_default_constructible<allocator_type>::value&& is_nothrow_default_constructible<key_compare>::value&&
@@ -1035,7 +1035,7 @@ struct __container_traits<set<_Key, _Compare, _Allocator> > {
};
template <class _Key, class _Compare = less<_Key>, class _Allocator = allocator<_Key> >
-class _LIBCPP_TEMPLATE_VIS multiset {
+class [[__libcpp_template_vis]] multiset {
public:
// types:
typedef _Key key_type;
@@ -1072,9 +1072,9 @@ public:
# endif
template <class _Key2, class _Compare2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS set;
+ friend class set;
template <class _Key2, class _Compare2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS multiset;
+ friend class multiset;
// construct/copy/destroy:
_LIBCPP_HIDE_FROM_ABI multiset() _NOEXCEPT_(
diff --git a/libcxx/include/span b/libcxx/include/span
index 5bb09ec515cea..402719baa5c9c 100644
--- a/libcxx/include/span
+++ b/libcxx/include/span
@@ -229,7 +229,7 @@ template <class _Sentinel, class _It>
concept __span_compatible_sentinel_for = sized_sentinel_for<_Sentinel, _It> && !is_convertible_v<_Sentinel, size_t>;
template <typename _Tp, size_t _Extent>
-class _LIBCPP_TEMPLATE_VIS span {
+class [[__libcpp_template_vis]] span {
public:
// constants and types
using element_type = _Tp;
@@ -412,7 +412,7 @@ private:
};
template <typename _Tp>
-class _LIBCPP_TEMPLATE_VIS span<_Tp, dynamic_extent> {
+class [[__libcpp_template_vis]] span<_Tp, dynamic_extent> {
public:
// constants and types
using element_type = _Tp;
diff --git a/libcxx/include/sstream b/libcxx/include/sstream
index 5dcfb446a5d6a..ee07ce761c827 100644
--- a/libcxx/include/sstream
+++ b/libcxx/include/sstream
@@ -342,7 +342,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// Class template basic_stringbuf [stringbuf]
template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS basic_stringbuf : public basic_streambuf<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_stringbuf : public basic_streambuf<_CharT, _Traits> {
public:
typedef _CharT char_type;
typedef _Traits traits_type;
@@ -864,7 +864,7 @@ typename basic_stringbuf<_CharT, _Traits, _Allocator>::pos_type basic_stringbuf<
// Class template basic_istringstream [istringstream]
template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS basic_istringstream : public basic_istream<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_istringstream : public basic_istream<_CharT, _Traits> {
public:
typedef _CharT char_type;
typedef _Traits traits_type;
@@ -1000,7 +1000,7 @@ swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x, basic_istringstream<
// Class template basic_ostringstream [ostringstream]
template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS basic_ostringstream : public basic_ostream<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_ostringstream : public basic_ostream<_CharT, _Traits> {
public:
typedef _CharT char_type;
typedef _Traits traits_type;
@@ -1138,7 +1138,7 @@ swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x, basic_ostringstream<
// Class template basic_stringstream [stringstream]
template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS basic_stringstream : public basic_iostream<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_stringstream : public basic_iostream<_CharT, _Traits> {
public:
typedef _CharT char_type;
typedef _Traits traits_type;
diff --git a/libcxx/include/stack b/libcxx/include/stack
index 3ff3df2c9650f..2f7c28a1e73f0 100644
--- a/libcxx/include/stack
+++ b/libcxx/include/stack
@@ -153,7 +153,7 @@ template <class _Tp, class _Container>
_LIBCPP_HIDE_FROM_ABI bool operator<(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
template <class _Tp, class _Container /*= deque<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS stack {
+class [[__libcpp_template_vis]] stack {
public:
typedef _Container container_type;
typedef typename container_type::value_type value_type;
@@ -366,8 +366,8 @@ inline _LIBCPP_HIDE_FROM_ABI void swap(stack<_Tp, _Container>& __x, stack<_Tp, _
}
template <class _Tp, class _Container, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<stack<_Tp, _Container>, _Alloc> : public uses_allocator<_Container, _Alloc> {
-};
+struct [[__libcpp_template_vis]]
+uses_allocator<stack<_Tp, _Container>, _Alloc> : public uses_allocator<_Container, _Alloc> {};
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/streambuf b/libcxx/include/streambuf
index 3c4e9086e05ec..4572986dc7d02 100644
--- a/libcxx/include/streambuf
+++ b/libcxx/include/streambuf
@@ -134,7 +134,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_streambuf {
+class [[__libcpp_template_vis]] basic_streambuf {
public:
// types:
typedef _CharT char_type;
diff --git a/libcxx/include/string b/libcxx/include/string
index ea9ba24084a3b..63aaa304b8c0c 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -1300,7 +1300,7 @@ public:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __resize_default_init(size_type __n);
# if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_STRING_RESERVE)
- _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve() _NOEXCEPT { shrink_to_fit(); }
+ [[__libcpp_deprecated_in_cxx20()]] _LIBCPP_HIDE_FROM_ABI void reserve() _NOEXCEPT { shrink_to_fit(); }
# endif
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void shrink_to_fit() _NOEXCEPT;
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void clear() _NOEXCEPT;
@@ -2253,17 +2253,17 @@ private:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
__init_with_size(_InputIterator __first, _Sentinel __last, size_type __sz);
- _LIBCPP_CONSTEXPR_SINCE_CXX20
+ [[__deprecated__("use __grow_by_without_replace")]] _LIBCPP_CONSTEXPR_SINCE_CXX20
# if _LIBCPP_ABI_VERSION >= 2 // We want to use the function in the dylib in ABIv1
_LIBCPP_HIDE_FROM_ABI
# endif
- _LIBCPP_DEPRECATED_("use __grow_by_without_replace") void __grow_by(
- size_type __old_cap,
- size_type __delta_cap,
- size_type __old_sz,
- size_type __n_copy,
- size_type __n_del,
- size_type __n_add = 0);
+ void
+ __grow_by(size_type __old_cap,
+ size_type __delta_cap,
+ size_type __old_sz,
+ size_type __n_copy,
+ size_type __n_del,
+ size_type __n_add = 0);
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __grow_by_without_replace(
size_type __old_cap,
size_type __delta_cap,
@@ -2654,7 +2654,7 @@ void _LIBCPP_CONSTEXPR_SINCE_CXX20
# if _LIBCPP_ABI_VERSION >= 2 // We want to use the function in the dylib in ABIv1
_LIBCPP_HIDE_FROM_ABI
# endif
-_LIBCPP_DEPRECATED_("use __grow_by_without_replace") basic_string<_CharT, _Traits, _Allocator>::__grow_by(
+basic_string<_CharT, _Traits, _Allocator>::__grow_by(
size_type __old_cap,
size_type __delta_cap,
size_type __old_sz,
diff --git a/libcxx/include/strstream b/libcxx/include/strstream
index 90d56694e7a6c..f9bc1e574b697 100644
--- a/libcxx/include/strstream
+++ b/libcxx/include/strstream
@@ -149,7 +149,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-class _LIBCPP_DEPRECATED _LIBCPP_EXPORTED_FROM_ABI strstreambuf : public streambuf {
+class [[__libcpp_deprecated()]] _LIBCPP_EXPORTED_FROM_ABI strstreambuf : public streambuf {
public:
# ifndef _LIBCPP_CXX03_LANG
_LIBCPP_HIDE_FROM_ABI strstreambuf() : strstreambuf(0) {}
@@ -234,7 +234,7 @@ inline _LIBCPP_HIDE_FROM_ABI strstreambuf& strstreambuf::operator=(strstreambuf&
# endif // _LIBCPP_CXX03_LANG
-class _LIBCPP_DEPRECATED _LIBCPP_EXPORTED_FROM_ABI istrstream : public istream {
+class [[__libcpp_deprecated()]] _LIBCPP_EXPORTED_FROM_ABI istrstream : public istream {
public:
_LIBCPP_HIDE_FROM_ABI explicit istrstream(const char* __s) : istream(&__sb_), __sb_(__s, 0) {}
_LIBCPP_HIDE_FROM_ABI explicit istrstream(char* __s) : istream(&__sb_), __sb_(__s, 0) {}
@@ -268,7 +268,7 @@ private:
strstreambuf __sb_;
};
-class _LIBCPP_DEPRECATED _LIBCPP_EXPORTED_FROM_ABI ostrstream : public ostream {
+class [[__libcpp_deprecated()]] _LIBCPP_EXPORTED_FROM_ABI ostrstream : public ostream {
public:
_LIBCPP_HIDE_FROM_ABI ostrstream() : ostream(&__sb_) {}
_LIBCPP_HIDE_FROM_ABI ostrstream(char* __s, int __n, ios_base::openmode __mode = ios_base::out)
@@ -303,7 +303,7 @@ private:
strstreambuf __sb_; // exposition only
};
-class _LIBCPP_DEPRECATED _LIBCPP_EXPORTED_FROM_ABI strstream : public iostream {
+class [[__libcpp_deprecated()]] _LIBCPP_EXPORTED_FROM_ABI strstream : public iostream {
public:
// Types
typedef char char_type;
diff --git a/libcxx/include/syncstream b/libcxx/include/syncstream
index 089d461450b37..0dc9d0256a873 100644
--- a/libcxx/include/syncstream
+++ b/libcxx/include/syncstream
@@ -248,7 +248,7 @@ private:
// Therefore the allocator used in the constructor is passed to the
// basic_string. The class does not keep a copy of this allocator.
template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS basic_syncbuf : public basic_streambuf<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_syncbuf : public basic_streambuf<_CharT, _Traits> {
public:
using char_type = _CharT;
using traits_type = _Traits;
@@ -439,7 +439,7 @@ swap(basic_syncbuf<_CharT, _Traits, _Allocator>& __lhs, basic_syncbuf<_CharT, _T
// basic_osyncstream
template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS basic_osyncstream : public basic_ostream<_CharT, _Traits> {
+class [[__libcpp_template_vis]] basic_osyncstream : public basic_ostream<_CharT, _Traits> {
public:
using char_type = _CharT;
using traits_type = _Traits;
diff --git a/libcxx/include/tuple b/libcxx/include/tuple
index 1e0703421da01..ad5bd392b3a4c 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -535,7 +535,7 @@ __memberwise_forward_assign(_Dest& __dest, _Source&& __source, __tuple_types<_Up
}
template <class... _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_NO_SPECIALIZATIONS tuple {
+class [[__libcpp_template_vis]] _LIBCPP_NO_SPECIALIZATIONS tuple {
typedef __tuple_impl<typename __make_tuple_indices<sizeof...(_Tp)>::type, _Tp...> _BaseT;
_BaseT __base_;
@@ -1010,7 +1010,7 @@ _LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Winvalid-specialization")
# endif
template <>
-class _LIBCPP_TEMPLATE_VIS tuple<> {
+class [[__libcpp_template_vis]] tuple<> {
public:
constexpr tuple() _NOEXCEPT = default;
template <class _Alloc>
@@ -1366,7 +1366,7 @@ tuple_cat(_Tuple0&& __t0, _Tuples&&... __tpls) {
}
template <class... _Tp, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<tuple<_Tp...>, _Alloc> : true_type {};
+struct [[__libcpp_template_vis]] uses_allocator<tuple<_Tp...>, _Alloc> : true_type {};
# if _LIBCPP_STD_VER >= 17
# define _LIBCPP_NOEXCEPT_RETURN(...) \
diff --git a/libcxx/include/typeindex b/libcxx/include/typeindex
index 76faee4bf199e..9e7680e57acca 100644
--- a/libcxx/include/typeindex
+++ b/libcxx/include/typeindex
@@ -62,7 +62,7 @@ struct hash<type_index>
_LIBCPP_BEGIN_NAMESPACE_STD
-class _LIBCPP_TEMPLATE_VIS type_index {
+class [[__libcpp_template_vis]] type_index {
const type_info* __t_;
public:
@@ -91,10 +91,10 @@ public:
};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash;
+struct [[__libcpp_template_vis]] hash;
template <>
-struct _LIBCPP_TEMPLATE_VIS hash<type_index> : public __unary_function<type_index, size_t> {
+struct [[__libcpp_template_vis]] hash<type_index> : public __unary_function<type_index, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(type_index __index) const _NOEXCEPT { return __index.hash_code(); }
};
diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map
index be36b65cb85b4..4a89e05d8059f 100644
--- a/libcxx/include/unordered_map
+++ b/libcxx/include/unordered_map
@@ -925,7 +925,7 @@ public:
# endif
template <class _HashIterator>
-class _LIBCPP_TEMPLATE_VIS __hash_map_iterator {
+class [[__libcpp_template_vis]] __hash_map_iterator {
_HashIterator __i_;
typedef __hash_node_types_from_iterator<_HashIterator> _NodeTypes;
@@ -964,19 +964,19 @@ public:
# endif
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ friend class unordered_map;
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+ friend class unordered_multimap;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+ friend class __hash_const_iterator;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+ friend class __hash_const_local_iterator;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
+ friend class __hash_map_const_iterator;
};
template <class _HashIterator>
-class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator {
+class [[__libcpp_template_vis]] __hash_map_const_iterator {
_HashIterator __i_;
typedef __hash_node_types_from_iterator<_HashIterator> _NodeTypes;
@@ -1020,13 +1020,13 @@ public:
# endif
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ friend class unordered_map;
template <class, class, class, class, class>
- friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+ friend class unordered_multimap;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
+ friend class __hash_const_iterator;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+ friend class __hash_const_local_iterator;
};
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
@@ -1037,7 +1037,7 @@ template <class _Key,
class _Hash = hash<_Key>,
class _Pred = equal_to<_Key>,
class _Alloc = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS unordered_map {
+class [[__libcpp_template_vis]] unordered_map {
public:
// types
typedef _Key key_type;
@@ -1093,9 +1093,9 @@ public:
# endif
template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ friend class unordered_map;
template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+ friend class unordered_multimap;
_LIBCPP_HIDE_FROM_ABI unordered_map() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) {}
explicit _LIBCPP_HIDE_FROM_ABI
@@ -1850,7 +1850,7 @@ template <class _Key,
class _Hash = hash<_Key>,
class _Pred = equal_to<_Key>,
class _Alloc = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS unordered_multimap {
+class [[__libcpp_template_vis]] unordered_multimap {
public:
// types
typedef _Key key_type;
@@ -1901,9 +1901,9 @@ public:
# endif
template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+ friend class unordered_map;
template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+ friend class unordered_multimap;
_LIBCPP_HIDE_FROM_ABI unordered_multimap() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) {}
explicit _LIBCPP_HIDE_FROM_ABI
diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set
index 87d98435329f3..e30679bdebffb 100644
--- a/libcxx/include/unordered_set
+++ b/libcxx/include/unordered_set
@@ -594,7 +594,7 @@ template <class _Value, class _Hash, class _Pred, class _Alloc>
class unordered_multiset;
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>, class _Alloc = allocator<_Value> >
-class _LIBCPP_TEMPLATE_VIS unordered_set {
+class [[__libcpp_template_vis]] unordered_set {
public:
// types
typedef _Value key_type;
@@ -630,9 +630,9 @@ public:
# endif
template <class _Value2, class _Hash2, class _Pred2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS unordered_set;
+ friend class unordered_set;
template <class _Value2, class _Hash2, class _Pred2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS unordered_multiset;
+ friend class unordered_multiset;
_LIBCPP_HIDE_FROM_ABI unordered_set() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) {}
explicit _LIBCPP_HIDE_FROM_ABI
@@ -1199,7 +1199,7 @@ struct __container_traits<unordered_set<_Value, _Hash, _Pred, _Alloc> > {
};
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>, class _Alloc = allocator<_Value> >
-class _LIBCPP_TEMPLATE_VIS unordered_multiset {
+class [[__libcpp_template_vis]] unordered_multiset {
public:
// types
typedef _Value key_type;
@@ -1233,9 +1233,9 @@ public:
# endif
template <class _Value2, class _Hash2, class _Pred2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS unordered_set;
+ friend class unordered_set;
template <class _Value2, class _Hash2, class _Pred2, class _Alloc2>
- friend class _LIBCPP_TEMPLATE_VIS unordered_multiset;
+ friend class unordered_multiset;
_LIBCPP_HIDE_FROM_ABI unordered_multiset() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) {}
explicit _LIBCPP_HIDE_FROM_ABI
diff --git a/libcxx/include/valarray b/libcxx/include/valarray
index abc7d391ada07..859d5006632ab 100644
--- a/libcxx/include/valarray
+++ b/libcxx/include/valarray
@@ -382,9 +382,9 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS valarray;
+class [[__libcpp_template_vis]] valarray;
-class _LIBCPP_TEMPLATE_VIS slice {
+class [[__libcpp_template_vis]] slice {
size_t __start_;
size_t __size_;
size_t __stride_;
@@ -409,14 +409,14 @@ public:
};
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS slice_array;
+class [[__libcpp_template_vis]] slice_array;
class _LIBCPP_EXPORTED_FROM_ABI gslice;
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS gslice_array;
+class [[__libcpp_template_vis]] gslice_array;
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS mask_array;
+class [[__libcpp_template_vis]] mask_array;
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS indirect_array;
+class [[__libcpp_template_vis]] indirect_array;
template <class _Tp>
_LIBCPP_HIDE_FROM_ABI _Tp* begin(valarray<_Tp>& __v);
@@ -638,7 +638,7 @@ public:
template <class>
friend class __val_expr;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS valarray;
+ friend class valarray;
};
template <class _ValExpr>
@@ -780,7 +780,7 @@ template <class _Tp>
struct __val_expr_use_member_functions<indirect_array<_Tp> > : true_type {};
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS valarray {
+class [[__libcpp_template_vis]] valarray {
public:
typedef _Tp value_type;
typedef _Tp __result_type;
@@ -918,17 +918,17 @@ public:
private:
template <class>
- friend class _LIBCPP_TEMPLATE_VIS valarray;
+ friend class valarray;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS slice_array;
+ friend class slice_array;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS gslice_array;
+ friend class gslice_array;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS mask_array;
+ friend class mask_array;
template <class>
friend class __mask_expr;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS indirect_array;
+ friend class indirect_array;
template <class>
friend class __indirect_expr;
template <class>
@@ -1038,7 +1038,7 @@ struct _BinaryOp<_Op, valarray<_Tp>, valarray<_Tp> > {
// slice_array
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS slice_array {
+class [[__libcpp_template_vis]] slice_array {
public:
typedef _Tp value_type;
@@ -1268,7 +1268,7 @@ private:
// gslice_array
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS gslice_array {
+class [[__libcpp_template_vis]] gslice_array {
public:
typedef _Tp value_type;
@@ -1453,7 +1453,7 @@ inline void gslice_array<_Tp>::operator=(const value_type& __x) const {
// mask_array
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS mask_array {
+class [[__libcpp_template_vis]] mask_array {
public:
typedef _Tp value_type;
@@ -1658,7 +1658,7 @@ public:
// indirect_array
template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS indirect_array {
+class [[__libcpp_template_vis]] indirect_array {
public:
typedef _Tp value_type;
@@ -1860,7 +1860,7 @@ public:
template <class>
friend class __val_expr;
template <class>
- friend class _LIBCPP_TEMPLATE_VIS valarray;
+ friend class valarray;
};
template <class _ValExpr>
diff --git a/libcxx/include/variant b/libcxx/include/variant
index 9e78ff2cc1a4f..50045d2043c3e 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -317,29 +317,31 @@ __throw_bad_variant_access() {
// variant_size
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_size<const _Tp> : variant_size<_Tp> {};
+struct [[__libcpp_template_vis]] variant_size<const _Tp> : variant_size<_Tp> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_size<volatile _Tp> : variant_size<_Tp> {};
+struct [[__libcpp_template_vis]] variant_size<volatile _Tp> : variant_size<_Tp> {};
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_size<const volatile _Tp> : variant_size<_Tp> {};
+struct [[__libcpp_template_vis]] variant_size<const volatile _Tp> : variant_size<_Tp> {};
template <class... _Types>
-struct _LIBCPP_TEMPLATE_VIS variant_size<variant<_Types...>> : integral_constant<size_t, sizeof...(_Types)> {};
+struct [[__libcpp_template_vis]] variant_size<variant<_Types...>> : integral_constant<size_t, sizeof...(_Types)> {};
// variant_alternative
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const _Tp> : add_const<variant_alternative_t<_Ip, _Tp>> {};
+struct [[__libcpp_template_vis]] variant_alternative<_Ip, const _Tp> : add_const<variant_alternative_t<_Ip, _Tp>> {};
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, volatile _Tp> : add_volatile<variant_alternative_t<_Ip, _Tp>> {};
+struct [[__libcpp_template_vis]]
+variant_alternative<_Ip, volatile _Tp> : add_volatile<variant_alternative_t<_Ip, _Tp>> {};
template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const volatile _Tp> : add_cv<variant_alternative_t<_Ip, _Tp>> {};
+struct [[__libcpp_template_vis]]
+variant_alternative<_Ip, const volatile _Tp> : add_cv<variant_alternative_t<_Ip, _Tp>> {};
template <size_t _Ip, class... _Types>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> {
+struct [[__libcpp_template_vis]] variant_alternative<_Ip, variant<_Types...>> {
static_assert(_Ip < sizeof...(_Types), "Index out of bounds in std::variant_alternative<>");
using type = __type_pack_element<_Ip, _Types...>;
};
@@ -658,7 +660,7 @@ private:
# define _LIBCPP_EAT_SEMICOLON static_assert(true, "")
template <size_t _Index, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS __alt {
+struct [[__libcpp_template_vis]] __alt {
using __value_type _LIBCPP_NODEBUG = _Tp;
static constexpr size_t __index = _Index;
@@ -670,14 +672,14 @@ struct _LIBCPP_TEMPLATE_VIS __alt {
};
template <_Trait _DestructibleTrait, size_t _Index, class... _Types>
-union _LIBCPP_TEMPLATE_VIS __union;
+union [[__libcpp_template_vis]] __union;
template <_Trait _DestructibleTrait, size_t _Index>
-union _LIBCPP_TEMPLATE_VIS __union<_DestructibleTrait, _Index> {};
+union [[__libcpp_template_vis]] __union<_DestructibleTrait, _Index> {};
# define _LIBCPP_VARIANT_UNION(destructible_trait, destructor_definition) \
template <size_t _Index, class _Tp, class... _Types> \
- union _LIBCPP_TEMPLATE_VIS __union<destructible_trait, _Index, _Tp, _Types...> { \
+ union [[__libcpp_template_vis]] __union<destructible_trait, _Index, _Tp, _Types...> { \
public: \
_LIBCPP_HIDE_FROM_ABI explicit constexpr __union(__valueless_t) noexcept : __dummy{} {} \
\
@@ -712,7 +714,7 @@ _LIBCPP_VARIANT_UNION(_Trait::_Unavailable, _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTE
# undef _LIBCPP_VARIANT_UNION
template <_Trait _DestructibleTrait, class... _Types>
-class _LIBCPP_TEMPLATE_VIS __base {
+class [[__libcpp_template_vis]] __base {
public:
using __index_t _LIBCPP_NODEBUG = __variant_index_t<sizeof...(_Types)>;
@@ -748,12 +750,12 @@ protected:
};
template <class _Traits, _Trait = _Traits::__destructible_trait>
-class _LIBCPP_TEMPLATE_VIS __dtor;
+class [[__libcpp_template_vis]] __dtor;
# define _LIBCPP_VARIANT_DESTRUCTOR(destructible_trait, destructor_definition, destroy) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS __dtor<__traits<_Types...>, destructible_trait> \
- : public __base<destructible_trait, _Types...> { \
+ class [[__libcpp_template_vis]] \
+ __dtor<__traits<_Types...>, destructible_trait> : public __base<destructible_trait, _Types...> { \
using __base_type _LIBCPP_NODEBUG = __base<destructible_trait, _Types...>; \
using __index_t _LIBCPP_NODEBUG = typename __base_type::__index_t; \
\
@@ -799,7 +801,7 @@ _LIBCPP_VARIANT_DESTRUCTOR(_Trait::_Unavailable,
# undef _LIBCPP_VARIANT_DESTRUCTOR
template <class _Traits>
-class _LIBCPP_TEMPLATE_VIS __ctor : public __dtor<_Traits> {
+class [[__libcpp_template_vis]] __ctor : public __dtor<_Traits> {
using __base_type _LIBCPP_NODEBUG = __dtor<_Traits>;
public:
@@ -826,12 +828,12 @@ protected:
};
template <class _Traits, _Trait = _Traits::__move_constructible_trait>
-class _LIBCPP_TEMPLATE_VIS __move_constructor;
+class [[__libcpp_template_vis]] __move_constructor;
# define _LIBCPP_VARIANT_MOVE_CONSTRUCTOR(move_constructible_trait, move_constructor_definition) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS __move_constructor<__traits<_Types...>, move_constructible_trait> \
- : public __ctor<__traits<_Types...>> { \
+ class [[__libcpp_template_vis]] \
+ __move_constructor<__traits<_Types...>, move_constructible_trait> : public __ctor<__traits<_Types...>> { \
using __base_type _LIBCPP_NODEBUG = __ctor<__traits<_Types...>>; \
\
public: \
@@ -864,11 +866,11 @@ _LIBCPP_VARIANT_MOVE_CONSTRUCTOR(
# undef _LIBCPP_VARIANT_MOVE_CONSTRUCTOR
template <class _Traits, _Trait = _Traits::__copy_constructible_trait>
-class _LIBCPP_TEMPLATE_VIS __copy_constructor;
+class [[__libcpp_template_vis]] __copy_constructor;
# define _LIBCPP_VARIANT_COPY_CONSTRUCTOR(copy_constructible_trait, copy_constructor_definition) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS __copy_constructor<__traits<_Types...>, copy_constructible_trait> \
+ class [[__libcpp_template_vis]] __copy_constructor<__traits<_Types...>, copy_constructible_trait> \
: public __move_constructor<__traits<_Types...>> { \
using __base_type _LIBCPP_NODEBUG = __move_constructor<__traits<_Types...>>; \
\
@@ -899,7 +901,7 @@ _LIBCPP_VARIANT_COPY_CONSTRUCTOR(
# undef _LIBCPP_VARIANT_COPY_CONSTRUCTOR
template <class _Traits>
-class _LIBCPP_TEMPLATE_VIS __assignment : public __copy_constructor<_Traits> {
+class [[__libcpp_template_vis]] __assignment : public __copy_constructor<_Traits> {
using __base_type _LIBCPP_NODEBUG = __copy_constructor<_Traits>;
public:
@@ -953,12 +955,12 @@ protected:
};
template <class _Traits, _Trait = _Traits::__move_assignable_trait>
-class _LIBCPP_TEMPLATE_VIS __move_assignment;
+class [[__libcpp_template_vis]] __move_assignment;
# define _LIBCPP_VARIANT_MOVE_ASSIGNMENT(move_assignable_trait, move_assignment_definition) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS __move_assignment<__traits<_Types...>, move_assignable_trait> \
- : public __assignment<__traits<_Types...>> { \
+ class [[__libcpp_template_vis]] \
+ __move_assignment<__traits<_Types...>, move_assignable_trait> : public __assignment<__traits<_Types...>> { \
using __base_type _LIBCPP_NODEBUG = __assignment<__traits<_Types...>>; \
\
public: \
@@ -992,12 +994,12 @@ _LIBCPP_VARIANT_MOVE_ASSIGNMENT(
# undef _LIBCPP_VARIANT_MOVE_ASSIGNMENT
template <class _Traits, _Trait = _Traits::__copy_assignable_trait>
-class _LIBCPP_TEMPLATE_VIS __copy_assignment;
+class [[__libcpp_template_vis]] __copy_assignment;
# define _LIBCPP_VARIANT_COPY_ASSIGNMENT(copy_assignable_trait, copy_assignment_definition) \
template <class... _Types> \
- class _LIBCPP_TEMPLATE_VIS __copy_assignment<__traits<_Types...>, copy_assignable_trait> \
- : public __move_assignment<__traits<_Types...>> { \
+ class [[__libcpp_template_vis]] \
+ __copy_assignment<__traits<_Types...>, copy_assignable_trait> : public __move_assignment<__traits<_Types...>> { \
using __base_type _LIBCPP_NODEBUG = __move_assignment<__traits<_Types...>>; \
\
public: \
@@ -1030,7 +1032,7 @@ _LIBCPP_VARIANT_COPY_ASSIGNMENT(_Trait::_Unavailable,
# undef _LIBCPP_VARIANT_COPY_ASSIGNMENT
template <class... _Types>
-class _LIBCPP_TEMPLATE_VIS __impl : public __copy_assignment<__traits<_Types...>> {
+class [[__libcpp_template_vis]] __impl : public __copy_assignment<__traits<_Types...>> {
using __base_type _LIBCPP_NODEBUG = __copy_assignment<__traits<_Types...>>;
public:
@@ -1157,7 +1159,7 @@ visit(_Visitor&& __visitor, _Vs&&... __vs);
# endif
template <class... _Types>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DECLSPEC_EMPTY_BASES _LIBCPP_NO_SPECIALIZATIONS variant
+class [[__libcpp_template_vis]] _LIBCPP_DECLSPEC_EMPTY_BASES _LIBCPP_NO_SPECIALIZATIONS variant
: private __sfinae_ctor_base< __all<is_copy_constructible_v<_Types>...>::value,
__all<is_move_constructible_v<_Types>...>::value>,
private __sfinae_assign_base<
@@ -1585,10 +1587,10 @@ swap(variant<_Types...>& __lhs,
}
template <class... _Types>
-struct _LIBCPP_TEMPLATE_VIS hash< __enable_hash_helper<variant<_Types...>, remove_const_t<_Types>...>> {
+struct [[__libcpp_template_vis]] hash< __enable_hash_helper<variant<_Types...>, remove_const_t<_Types>...>> {
# if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
- using argument_type _LIBCPP_DEPRECATED_IN_CXX17 = variant<_Types...>;
- using result_type _LIBCPP_DEPRECATED_IN_CXX17 = size_t;
+ using argument_type [[__libcpp_deprecated_in_cxx17()]] = variant<_Types...>;
+ using result_type [[__libcpp_deprecated_in_cxx17()]] = size_t;
# endif
_LIBCPP_HIDE_FROM_ABI size_t operator()(const variant<_Types...>& __v) const {
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 9ea59a3a19ca4..79ba32319da24 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -5718,9 +5718,9 @@ _LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_V
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char, char, mbstate_t>;
_LIBCPP_IF_WIDE_CHARACTERS(
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<wchar_t, char, mbstate_t>;)
-template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
+template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
codecvt_byname<char16_t, char, mbstate_t>;
-template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
+template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
codecvt_byname<char32_t, char, mbstate_t>;
#if _LIBCPP_HAS_CHAR8_T
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char8_t, mbstate_t>;
More information about the libcxx-commits
mailing list