diff --git a/libcxx/.clang-format b/libcxx/.clang-format --- a/libcxx/.clang-format +++ b/libcxx/.clang-format @@ -26,12 +26,10 @@ '_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS', '_LIBCPP_FUNC_VIS', '_LIBCPP_TYPE_VIS', - '_LIBCPP_TEMPLATE_VIS', '_LIBCPP_TEMPLATE_DATA_VIS', '_LIBCPP_EXPORTED_FROM_ABI', '_LIBCPP_OVERRIDABLE_FUNC_VIS', '_LIBCPP_EXCEPTION_ABI', - '_LIBCPP_ENUM_VIS', '_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS', '_LIBCPP_INTERNAL_LINKAGE', '_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION', diff --git a/libcxx/docs/DesignDocs/VisibilityMacros.rst b/libcxx/docs/DesignDocs/VisibilityMacros.rst --- a/libcxx/docs/DesignDocs/VisibilityMacros.rst +++ b/libcxx/docs/DesignDocs/VisibilityMacros.rst @@ -69,38 +69,13 @@ Mark a type's typeinfo, vtable and members as having default visibility. This attribute cannot be used on class templates. -**_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. - - **GCC Behavior**: GCC does not support Clang's `type_visibility(...)` - attribute. With GCC the `visibility(...)` attribute is used and member - functions are affected. - - **Windows Behavior**: DLLs do not support dllimport/export on class templates. - The macro has an empty definition on this platform. - - -**_LIBCPP_ENUM_VIS** - Mark the typeinfo of an enum as having default visibility. This attribute - should be applied to all enum declarations. - - **Windows Behavior**: DLLs do not support importing or exporting enumeration - typeinfo. The macro has an empty definition on this platform. - - **GCC Behavior**: GCC un-hides the typeinfo for enumerations by default, even - if `-fvisibility=hidden` is specified. Additionally applying a visibility - attribute to an enum class results in a warning. The macro has an empty - definition with GCC. - **_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS** Mark the member functions, typeinfo, and vtable of the type named in 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 - specified on the primary template and to export the member functions produced - by the explicit instantiation in the dylib. + This macro is used to export the member functions produced by the explicit + instantiation in the dylib. **Windows Behavior**: `extern template` and `dllexport` are fundamentally incompatible *on a class template* on Windows; the former suppresses diff --git a/libcxx/include/__charconv/chars_format.h b/libcxx/include/__charconv/chars_format.h --- a/libcxx/include/__charconv/chars_format.h +++ b/libcxx/include/__charconv/chars_format.h @@ -21,7 +21,7 @@ #if _LIBCPP_STD_VER >= 17 -enum class _LIBCPP_ENUM_VIS chars_format { scientific = 0x1, fixed = 0x2, hex = 0x4, general = fixed | scientific }; +enum class chars_format { scientific = 0x1, fixed = 0x2, hex = 0x4, general = fixed | scientific }; inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format operator~(chars_format __x) { return chars_format(~std::__to_underlying(__x)); diff --git a/libcxx/include/__chrono/duration.h b/libcxx/include/__chrono/duration.h --- a/libcxx/include/__chrono/duration.h +++ b/libcxx/include/__chrono/duration.h @@ -32,7 +32,7 @@ namespace chrono { -template > class _LIBCPP_TEMPLATE_VIS duration; +template > class duration; template struct __is_duration : false_type {}; @@ -52,8 +52,7 @@ } // namespace chrono template -struct _LIBCPP_TEMPLATE_VIS common_type, - chrono::duration<_Rep2, _Period2> > +struct common_type, chrono::duration<_Rep2, _Period2> > { typedef chrono::duration::type, typename __ratio_gcd<_Period1, _Period2>::type> type; @@ -130,7 +129,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {}; +struct treat_as_floating_point : is_floating_point<_Rep> {}; #if _LIBCPP_STD_VER >= 17 template @@ -138,7 +137,7 @@ #endif template -struct _LIBCPP_TEMPLATE_VIS duration_values +struct duration_values { public: _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR _Rep zero() _NOEXCEPT {return _Rep(0);} @@ -201,7 +200,7 @@ // duration template -class _LIBCPP_TEMPLATE_VIS duration +class duration { static_assert(!__is_duration<_Rep>::value, "A duration representation can not be a duration"); static_assert(__is_ratio<_Period>::value, "Second template parameter of duration must be a std::ratio"); diff --git a/libcxx/include/__chrono/formatter.h b/libcxx/include/__chrono/formatter.h --- a/libcxx/include/__chrono/formatter.h +++ b/libcxx/include/__chrono/formatter.h @@ -561,7 +561,7 @@ } // namespace __formatter template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS __formatter_chrono { +struct __formatter_chrono { public: template _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator @@ -579,7 +579,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> : public __formatter_chrono<_CharT> { +struct formatter, _CharT> : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -590,7 +590,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> : public __formatter_chrono<_CharT> { +struct formatter, _CharT> : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -601,7 +601,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> : public __formatter_chrono<_CharT> { +struct formatter, _CharT> : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -635,8 +635,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -647,8 +646,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -659,8 +657,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -671,8 +668,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -683,8 +679,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -695,8 +690,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -707,8 +701,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -719,8 +712,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -731,8 +723,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -743,8 +734,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -755,8 +745,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -767,8 +756,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -779,8 +767,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -791,8 +778,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; @@ -803,8 +789,7 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_chrono<_CharT> { +struct formatter : public __formatter_chrono<_CharT> { public: using _Base = __formatter_chrono<_CharT>; diff --git a/libcxx/include/__chrono/parser_std_format_spec.h b/libcxx/include/__chrono/parser_std_format_spec.h --- a/libcxx/include/__chrono/parser_std_format_spec.h +++ b/libcxx/include/__chrono/parser_std_format_spec.h @@ -136,7 +136,7 @@ } template -class _LIBCPP_TEMPLATE_VIS __parser_chrono { +class __parser_chrono { using _ConstIterator = 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 --- a/libcxx/include/__chrono/time_point.h +++ b/libcxx/include/__chrono/time_point.h @@ -32,7 +32,7 @@ { template -class _LIBCPP_TEMPLATE_VIS time_point +class time_point { static_assert(__is_duration<_Duration>::value, "Second template parameter of time_point must be a std::chrono::duration"); @@ -76,8 +76,7 @@ } // namespace chrono template -struct _LIBCPP_TEMPLATE_VIS common_type, - chrono::time_point<_Clock, _Duration2> > +struct common_type, 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 --- a/libcxx/include/__compare/common_comparison_category.h +++ b/libcxx/include/__compare/common_comparison_category.h @@ -81,7 +81,7 @@ // [cmp.common], common comparison category type template -struct _LIBCPP_TEMPLATE_VIS common_comparison_category { +struct 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 --- a/libcxx/include/__compare/compare_three_way.h +++ b/libcxx/include/__compare/compare_three_way.h @@ -22,7 +22,7 @@ #if _LIBCPP_STD_VER >= 20 -struct _LIBCPP_TEMPLATE_VIS compare_three_way +struct compare_three_way { template requires three_way_comparable_with<_T1, _T2> diff --git a/libcxx/include/__compare/compare_three_way_result.h b/libcxx/include/__compare/compare_three_way_result.h --- a/libcxx/include/__compare/compare_three_way_result.h +++ b/libcxx/include/__compare/compare_three_way_result.h @@ -32,7 +32,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS compare_three_way_result : __compare_three_way_result<_Tp, _Up, void> { }; +struct compare_three_way_result : __compare_three_way_result<_Tp, _Up, void> { }; template using compare_three_way_result_t = typename compare_three_way_result<_Tp, _Up>::type; diff --git a/libcxx/include/__compare/ordering.h b/libcxx/include/__compare/ordering.h --- a/libcxx/include/__compare/ordering.h +++ b/libcxx/include/__compare/ordering.h @@ -22,13 +22,13 @@ #if _LIBCPP_STD_VER >= 20 // exposition only -enum class _LIBCPP_ENUM_VIS _OrdResult : signed char { +enum class _OrdResult : signed char { __less = -1, __equiv = 0, __greater = 1 }; -enum class _LIBCPP_ENUM_VIS _NCmpResult : signed char { +enum class _NCmpResult : signed char { __unordered = -127 }; diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -544,9 +544,8 @@ # define _LIBCPP_EXCEPTION_ABI _LIBCPP_DLL_VIS # define _LIBCPP_HIDDEN # define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS -# define _LIBCPP_TEMPLATE_VIS +# define _LIBCPP_DEFAULT_VISIBILITY # define _LIBCPP_TEMPLATE_DATA_VIS -# define _LIBCPP_ENUM_VIS # else @@ -557,6 +556,7 @@ # endif # define _LIBCPP_HIDDEN _LIBCPP_VISIBILITY("hidden") +# define _LIBCPP_DEFAULT_VISIBILITY _LIBCPP_VISIBILITY("default") # define _LIBCPP_FUNC_VIS _LIBCPP_VISIBILITY("default") # define _LIBCPP_TYPE_VIS _LIBCPP_VISIBILITY("default") # define _LIBCPP_TEMPLATE_DATA_VIS _LIBCPP_VISIBILITY("default") @@ -577,22 +577,6 @@ # define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS # endif -# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) -# if __has_attribute(__type_visibility__) -# define _LIBCPP_TEMPLATE_VIS __attribute__((__type_visibility__("default"))) -# else -# define _LIBCPP_TEMPLATE_VIS __attribute__((__visibility__("default"))) -# endif -# else -# define _LIBCPP_TEMPLATE_VIS -# endif - -# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__) -# define _LIBCPP_ENUM_VIS __attribute__((__type_visibility__("default"))) -# else -# define _LIBCPP_ENUM_VIS -# endif - # endif // defined(_LIBCPP_OBJECT_FORMAT_COFF) # if __has_attribute(exclude_from_explicit_instantiation) @@ -664,7 +648,7 @@ // Inline namespaces are available in Clang/GCC/MSVC regardless of C++ dialect. // clang-format off -# define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_ABI_NAMESPACE { +# define _LIBCPP_BEGIN_NAMESPACE_STD namespace _LIBCPP_DEFAULT_VISIBILITY std { inline namespace _LIBCPP_ABI_NAMESPACE { # define _LIBCPP_END_NAMESPACE_STD }} # define _VSTD std @@ -717,7 +701,7 @@ // clang-format on # else // _LIBCPP_CXX03_LANG -# define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_ENUM_VIS x +# define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class x # define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) # endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__coroutine/coroutine_handle.h b/libcxx/include/__coroutine/coroutine_handle.h --- a/libcxx/include/__coroutine/coroutine_handle.h +++ b/libcxx/include/__coroutine/coroutine_handle.h @@ -27,10 +27,10 @@ // [coroutine.handle] template -struct _LIBCPP_TEMPLATE_VIS coroutine_handle; +struct coroutine_handle; template <> -struct _LIBCPP_TEMPLATE_VIS coroutine_handle { +struct coroutine_handle { public: // [coroutine.handle.con], construct/reset constexpr coroutine_handle() noexcept = default; @@ -104,7 +104,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS coroutine_handle { +struct 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 --- a/libcxx/include/__coroutine/noop_coroutine_handle.h +++ b/libcxx/include/__coroutine/noop_coroutine_handle.h @@ -28,7 +28,7 @@ // [coroutine.handle.noop] template <> -struct _LIBCPP_TEMPLATE_VIS coroutine_handle { +struct coroutine_handle { public: // [coroutine.handle.noop.conv], conversion _LIBCPP_HIDE_FROM_ABI diff --git a/libcxx/include/__filesystem/copy_options.h b/libcxx/include/__filesystem/copy_options.h --- a/libcxx/include/__filesystem/copy_options.h +++ b/libcxx/include/__filesystem/copy_options.h @@ -23,7 +23,7 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH -enum class _LIBCPP_ENUM_VIS copy_options : unsigned short { +enum class copy_options : unsigned short { none = 0, skip_existing = 1, overwrite_existing = 2, diff --git a/libcxx/include/__filesystem/directory_options.h b/libcxx/include/__filesystem/directory_options.h --- a/libcxx/include/__filesystem/directory_options.h +++ b/libcxx/include/__filesystem/directory_options.h @@ -23,7 +23,7 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH -enum class _LIBCPP_ENUM_VIS directory_options : unsigned char { +enum class directory_options : unsigned char { none = 0, follow_directory_symlink = 1, skip_permission_denied = 2 diff --git a/libcxx/include/__filesystem/file_type.h b/libcxx/include/__filesystem/file_type.h --- a/libcxx/include/__filesystem/file_type.h +++ b/libcxx/include/__filesystem/file_type.h @@ -23,7 +23,7 @@ // On Windows, the library never identifies files as block, character, fifo // or socket. -enum class _LIBCPP_ENUM_VIS file_type : signed char { +enum class file_type : signed char { none = 0, not_found = -1, regular = 1, diff --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h --- a/libcxx/include/__filesystem/path.h +++ b/libcxx/include/__filesystem/path.h @@ -466,7 +466,7 @@ typedef basic_string string_type; typedef basic_string_view __string_view; - enum _LIBCPP_ENUM_VIS format : unsigned char { + enum format : unsigned char { auto_format, native_format, generic_format diff --git a/libcxx/include/__filesystem/perm_options.h b/libcxx/include/__filesystem/perm_options.h --- a/libcxx/include/__filesystem/perm_options.h +++ b/libcxx/include/__filesystem/perm_options.h @@ -23,7 +23,7 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH -enum class _LIBCPP_ENUM_VIS perm_options : unsigned char { +enum class perm_options : unsigned char { replace = 1, add = 2, remove = 4, diff --git a/libcxx/include/__filesystem/perms.h b/libcxx/include/__filesystem/perms.h --- a/libcxx/include/__filesystem/perms.h +++ b/libcxx/include/__filesystem/perms.h @@ -27,7 +27,7 @@ // file, and the executable bit is always returned as set. When setting // permissions, as long as the write bit is set for either owner, group or // others, the readonly flag is cleared. -enum class _LIBCPP_ENUM_VIS perms : unsigned { +enum class perms : unsigned { none = 0, owner_read = 0400, diff --git a/libcxx/include/__format/buffer.h b/libcxx/include/__format/buffer.h --- a/libcxx/include/__format/buffer.h +++ b/libcxx/include/__format/buffer.h @@ -59,7 +59,7 @@ /// type-erasure for the formatting functions. This reduces the number to /// template instantiations. template <__fmt_char_type _CharT> -class _LIBCPP_TEMPLATE_VIS __output_buffer { +class __output_buffer { public: using value_type = _CharT; @@ -232,7 +232,7 @@ /// This storage is used when writing a single element to the output iterator /// is expensive. template <__fmt_char_type _CharT> -class _LIBCPP_TEMPLATE_VIS __internal_storage { +class __internal_storage { public: _LIBCPP_HIDE_FROM_ABI _CharT* __begin() { return __buffer_; } @@ -248,7 +248,7 @@ /// Since the output is directly written to the underlying storage this class /// is just an empty class. template <__fmt_char_type _CharT> -class _LIBCPP_TEMPLATE_VIS __direct_storage {}; +class __direct_storage {}; template concept __enable_direct_output = __fmt_char_type<_CharT> && @@ -260,7 +260,7 @@ /// Write policy for directly writing to the underlying output. template -class _LIBCPP_TEMPLATE_VIS __writer_direct { +class __writer_direct { public: _LIBCPP_HIDE_FROM_ABI explicit __writer_direct(_OutIt __out_it) : __out_it_(__out_it) {} @@ -279,7 +279,7 @@ /// Write policy for copying the buffer to the output. template -class _LIBCPP_TEMPLATE_VIS __writer_iterator { +class __writer_iterator { public: _LIBCPP_HIDE_FROM_ABI explicit __writer_iterator(_OutIt __out_it) : __out_it_{_VSTD::move(__out_it)} {} @@ -309,18 +309,18 @@ /// Extract the container type of a \ref back_insert_iterator. template -struct _LIBCPP_TEMPLATE_VIS __back_insert_iterator_container { +struct __back_insert_iterator_container { using type = void; }; template <__insertable _Container> -struct _LIBCPP_TEMPLATE_VIS __back_insert_iterator_container> { +struct __back_insert_iterator_container> { using type = _Container; }; /// Write policy for inserting the buffer in a container. template -class _LIBCPP_TEMPLATE_VIS __writer_container { +class __writer_container { public: using _CharT = typename _Container::value_type; @@ -339,7 +339,7 @@ /// Selects the type of the writer used for the output iterator. template -class _LIBCPP_TEMPLATE_VIS __writer_selector { +class __writer_selector { using _Container = typename __back_insert_iterator_container<_OutIt>::type; public: @@ -350,8 +350,8 @@ /// The generic formatting buffer. template -requires(output_iterator<_OutIt, const _CharT&>) class _LIBCPP_TEMPLATE_VIS - __format_buffer { + requires(output_iterator<_OutIt, const _CharT&>) +class __format_buffer { using _Storage = conditional_t<__enable_direct_output<_OutIt, _CharT>, __direct_storage<_CharT>, __internal_storage<_CharT>>; @@ -386,7 +386,7 @@ /// Since \ref 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 { +class __formatted_size_buffer { public: _LIBCPP_HIDE_FROM_ABI auto __make_output_iterator() { return __output_.__make_output_iterator(); } @@ -406,7 +406,7 @@ /// The base of a buffer that counts and limits the number of insertions. template requires(output_iterator<_OutIt, const _CharT&>) -struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base { +struct __format_to_n_buffer_base { using _Size = iter_difference_t<_OutIt>; public: @@ -436,7 +436,7 @@ /// exceed the maximum number of code units. template requires(output_iterator<_OutIt, const _CharT&>) -class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> { +class __format_to_n_buffer_base<_OutIt, _CharT, true> { using _Size = iter_difference_t<_OutIt>; public: @@ -486,7 +486,7 @@ /// The buffer that counts and limits the number of insertions. template requires(output_iterator<_OutIt, const _CharT&>) -struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final +struct __format_to_n_buffer final : public __format_to_n_buffer_base< _OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>> { using _Base = __format_to_n_buffer_base<_OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>>; using _Size = iter_difference_t<_OutIt>; @@ -521,7 +521,7 @@ // This class uses its own buffer management, since using vector // would lead to a circular include with formatter for vector. template <__fmt_char_type _CharT> -class _LIBCPP_TEMPLATE_VIS __retarget_buffer { +class __retarget_buffer { using _Alloc = allocator<_CharT>; public: diff --git a/libcxx/include/__format/container_adaptor.h b/libcxx/include/__format/container_adaptor.h --- a/libcxx/include/__format/container_adaptor.h +++ b/libcxx/include/__format/container_adaptor.h @@ -37,7 +37,7 @@ // adaptor headers. To use the format functions users already include . template -struct _LIBCPP_TEMPLATE_VIS __formatter_container_adaptor { +struct __formatter_container_adaptor { private: using __maybe_const_container = __fmt_maybe_const; using __maybe_const_adaptor = __maybe_const, _Adaptor>; @@ -57,15 +57,15 @@ }; template _Container> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> +struct formatter, _CharT> : public __formatter_container_adaptor, _CharT> {}; template -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> +struct formatter, _CharT> : public __formatter_container_adaptor, _CharT> {}; template _Container> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> +struct formatter, _CharT> : public __formatter_container_adaptor, _CharT> {}; #endif //_LIBCPP_STD_VER >= 23 diff --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h --- a/libcxx/include/__format/format_arg.h +++ b/libcxx/include/__format/format_arg.h @@ -54,7 +54,7 @@ /// handle to satisfy the user observable behaviour. The internal function /// __visit_format_arg doesn't do this wrapping. So in the format functions /// this function is used to avoid unneeded overhead. -enum class _LIBCPP_ENUM_VIS __arg_t : uint8_t { +enum class __arg_t : uint8_t { __none, __boolean, __char_type, @@ -227,9 +227,9 @@ }; template -class _LIBCPP_TEMPLATE_VIS basic_format_arg { +class basic_format_arg { public: - class _LIBCPP_TEMPLATE_VIS handle; + class handle; _LIBCPP_HIDE_FROM_ABI basic_format_arg() noexcept : __type_{__format::__arg_t::__none} {} @@ -262,7 +262,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS basic_format_arg<_Context>::handle { +class basic_format_arg<_Context>::handle { public: _LIBCPP_HIDE_FROM_ABI void format(basic_format_parse_context& __parse_ctx, _Context& __ctx) const { diff --git a/libcxx/include/__format/format_arg_store.h b/libcxx/include/__format/format_arg_store.h --- a/libcxx/include/__format/format_arg_store.h +++ b/libcxx/include/__format/format_arg_store.h @@ -233,7 +233,7 @@ } // namespace __format template -struct _LIBCPP_TEMPLATE_VIS __format_arg_store { +struct __format_arg_store { _LIBCPP_HIDE_FROM_ABI __format_arg_store(_Args&... __args) noexcept { if constexpr (sizeof...(_Args) != 0) { diff --git a/libcxx/include/__format/format_args.h b/libcxx/include/__format/format_args.h --- a/libcxx/include/__format/format_args.h +++ b/libcxx/include/__format/format_args.h @@ -27,7 +27,7 @@ #if _LIBCPP_STD_VER >= 20 template -class _LIBCPP_TEMPLATE_VIS basic_format_args { +class basic_format_args { public: basic_format_args() noexcept = default; diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h --- a/libcxx/include/__format/format_context.h +++ b/libcxx/include/__format/format_context.h @@ -41,7 +41,7 @@ template requires output_iterator<_OutIt, const _CharT&> -class _LIBCPP_TEMPLATE_VIS basic_format_context; +class basic_format_context; #ifndef _LIBCPP_HAS_NO_LOCALIZATION /** @@ -76,14 +76,12 @@ #endif template -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 { + requires output_iterator<_OutIt, const _CharT&> +// clang-format off +class _LIBCPP_PREFERRED_NAME(format_context) + _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wformat_context)) + basic_format_context { + // clang-format on public: using iterator = _OutIt; using char_type = _CharT; @@ -161,8 +159,7 @@ // 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 _LIBCPP_TEMPLATE_VIS - basic_format_context::__iterator, _CharT> { +class basic_format_context::__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 --- a/libcxx/include/__format/format_functions.h +++ b/libcxx/include/__format/format_functions.h @@ -83,7 +83,7 @@ /// 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 _LIBCPP_TEMPLATE_VIS __compile_time_handle { +class __compile_time_handle { public: template _LIBCPP_HIDE_FROM_ABI constexpr void __parse(_ParseContext& __ctx) const { @@ -110,7 +110,7 @@ // Dummy format_context only providing the parts used during constant // validation of the basic_format_string. template -struct _LIBCPP_TEMPLATE_VIS __compile_time_basic_format_context { +struct __compile_time_basic_format_context { public: using char_type = _CharT; @@ -337,7 +337,7 @@ } // namespace __format template -struct _LIBCPP_TEMPLATE_VIS basic_format_string { +struct basic_format_string { template requires convertible_to> consteval basic_format_string(const _Tp& __str) : __str_{__str} { diff --git a/libcxx/include/__format/format_fwd.h b/libcxx/include/__format/format_fwd.h --- a/libcxx/include/__format/format_fwd.h +++ b/libcxx/include/__format/format_fwd.h @@ -23,14 +23,14 @@ #if _LIBCPP_STD_VER >= 20 template -class _LIBCPP_TEMPLATE_VIS basic_format_arg; +class basic_format_arg; template requires output_iterator<_OutIt, const _CharT&> -class _LIBCPP_TEMPLATE_VIS basic_format_context; +class basic_format_context; template -struct _LIBCPP_TEMPLATE_VIS formatter; +struct formatter; #endif //_LIBCPP_STD_VER >= 20 diff --git a/libcxx/include/__format/format_parse_context.h b/libcxx/include/__format/format_parse_context.h --- a/libcxx/include/__format/format_parse_context.h +++ b/libcxx/include/__format/format_parse_context.h @@ -24,7 +24,7 @@ #if _LIBCPP_STD_VER >= 20 template -class _LIBCPP_TEMPLATE_VIS basic_format_parse_context { +class 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 --- a/libcxx/include/__format/format_string.h +++ b/libcxx/include/__format/format_string.h @@ -29,7 +29,7 @@ namespace __format { template -struct _LIBCPP_TEMPLATE_VIS __parse_number_result { +struct __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 --- a/libcxx/include/__format/format_to_n_result.h +++ b/libcxx/include/__format/format_to_n_result.h @@ -22,7 +22,7 @@ #if _LIBCPP_STD_VER >= 20 template -struct _LIBCPP_TEMPLATE_VIS format_to_n_result { +struct 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 --- a/libcxx/include/__format/formatter.h +++ b/libcxx/include/__format/formatter.h @@ -32,7 +32,7 @@ /// - is_copy_assignable, and /// - is_move_assignable. template -struct _LIBCPP_TEMPLATE_VIS formatter { +struct formatter { formatter() = delete; formatter(const formatter&) = delete; formatter& operator=(const formatter&) = delete; diff --git a/libcxx/include/__format/formatter_bool.h b/libcxx/include/__format/formatter_bool.h --- a/libcxx/include/__format/formatter_bool.h +++ b/libcxx/include/__format/formatter_bool.h @@ -36,7 +36,7 @@ #if _LIBCPP_STD_VER >= 20 template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter { +struct formatter { public: template _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 --- a/libcxx/include/__format/formatter_char.h +++ b/libcxx/include/__format/formatter_char.h @@ -31,7 +31,7 @@ #if _LIBCPP_STD_VER >= 20 template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS __formatter_char { +struct __formatter_char { public: template _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) { @@ -76,14 +76,14 @@ }; template <> -struct _LIBCPP_TEMPLATE_VIS formatter : public __formatter_char {}; +struct formatter : public __formatter_char {}; # ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> -struct _LIBCPP_TEMPLATE_VIS formatter : public __formatter_char {}; +struct formatter : public __formatter_char {}; template <> -struct _LIBCPP_TEMPLATE_VIS formatter : public __formatter_char { +struct formatter : public __formatter_char { }; # endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS diff --git a/libcxx/include/__format/formatter_floating_point.h b/libcxx/include/__format/formatter_floating_point.h --- a/libcxx/include/__format/formatter_floating_point.h +++ b/libcxx/include/__format/formatter_floating_point.h @@ -138,7 +138,7 @@ /// Depending on the maxium size required for a value, the buffer is allocated /// on the stack or the heap. template -class _LIBCPP_TEMPLATE_VIS __float_buffer { +class __float_buffer { using _Traits = __traits<_Fp>; public: @@ -725,7 +725,7 @@ } // namespace __formatter template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS __formatter_floating_point { +struct __formatter_floating_point { public: template _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) { @@ -743,14 +743,11 @@ }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_floating_point<_CharT> {}; +struct formatter : public __formatter_floating_point<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_floating_point<_CharT> {}; +struct formatter : public __formatter_floating_point<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_floating_point<_CharT> {}; +struct formatter : public __formatter_floating_point<_CharT> {}; #endif //_LIBCPP_STD_VER >= 20 diff --git a/libcxx/include/__format/formatter_integer.h b/libcxx/include/__format/formatter_integer.h --- a/libcxx/include/__format/formatter_integer.h +++ b/libcxx/include/__format/formatter_integer.h @@ -30,8 +30,8 @@ #if _LIBCPP_STD_VER >= 20 - template <__fmt_char_type _CharT> - struct _LIBCPP_TEMPLATE_VIS __formatter_integer { +template <__fmt_char_type _CharT> +struct __formatter_integer { public: template @@ -60,44 +60,35 @@ // Signed integral types. template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_integer<_CharT> {}; +struct formatter : public __formatter_integer<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter : public __formatter_integer<_CharT> { +struct formatter : public __formatter_integer<_CharT> { }; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter : public __formatter_integer<_CharT> {}; +struct formatter : public __formatter_integer<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter : public __formatter_integer<_CharT> {}; +struct formatter : public __formatter_integer<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_integer<_CharT> {}; +struct formatter : public __formatter_integer<_CharT> {}; # ifndef _LIBCPP_HAS_NO_INT128 template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter<__int128_t, _CharT> - : public __formatter_integer<_CharT> {}; +struct formatter<__int128_t, _CharT> : public __formatter_integer<_CharT> {}; # endif // Unsigned integral types. template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_integer<_CharT> {}; +struct formatter : public __formatter_integer<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_integer<_CharT> {}; +struct formatter : public __formatter_integer<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_integer<_CharT> {}; +struct formatter : public __formatter_integer<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_integer<_CharT> {}; +struct formatter : public __formatter_integer<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_integer<_CharT> {}; +struct formatter : public __formatter_integer<_CharT> {}; # ifndef _LIBCPP_HAS_NO_INT128 template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter<__uint128_t, _CharT> - : public __formatter_integer<_CharT> {}; +struct formatter<__uint128_t, _CharT> : public __formatter_integer<_CharT> {}; # endif #endif //_LIBCPP_STD_VER >= 20 diff --git a/libcxx/include/__format/formatter_integral.h b/libcxx/include/__format/formatter_integral.h --- a/libcxx/include/__format/formatter_integral.h +++ b/libcxx/include/__format/formatter_integral.h @@ -326,17 +326,17 @@ // template -struct _LIBCPP_TEMPLATE_VIS __bool_strings; +struct __bool_strings; template <> -struct _LIBCPP_TEMPLATE_VIS __bool_strings { +struct __bool_strings { static constexpr string_view __true{"true"}; static constexpr string_view __false{"false"}; }; # ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> -struct _LIBCPP_TEMPLATE_VIS __bool_strings { +struct __bool_strings { static constexpr wstring_view __true{L"true"}; static constexpr wstring_view __false{L"false"}; }; diff --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h --- a/libcxx/include/__format/formatter_output.h +++ b/libcxx/include/__format/formatter_output.h @@ -491,7 +491,7 @@ return static_cast>(__value); } -enum class _LIBCPP_ENUM_VIS __escape_quotation_mark { __apostrophe, __double_quote }; +enum class __escape_quotation_mark { __apostrophe, __double_quote }; // [format.string.escaped]/2 template diff --git a/libcxx/include/__format/formatter_pointer.h b/libcxx/include/__format/formatter_pointer.h --- a/libcxx/include/__format/formatter_pointer.h +++ b/libcxx/include/__format/formatter_pointer.h @@ -30,7 +30,7 @@ #if _LIBCPP_STD_VER >= 20 template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS __formatter_pointer { +struct __formatter_pointer { public: template _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) { @@ -56,14 +56,11 @@ // - template<> struct formatter; // - template<> struct formatter; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_pointer<_CharT> {}; +struct formatter : public __formatter_pointer<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter : public __formatter_pointer<_CharT> { -}; +struct formatter : public __formatter_pointer<_CharT> {}; template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter - : public __formatter_pointer<_CharT> {}; +struct formatter : public __formatter_pointer<_CharT> {}; #endif //_LIBCPP_STD_VER >= 20 diff --git a/libcxx/include/__format/formatter_string.h b/libcxx/include/__format/formatter_string.h --- a/libcxx/include/__format/formatter_string.h +++ b/libcxx/include/__format/formatter_string.h @@ -30,7 +30,7 @@ #if _LIBCPP_STD_VER >= 20 template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS __formatter_string { +struct __formatter_string { public: template _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) { @@ -59,7 +59,7 @@ // Formatter const char*. template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter +struct formatter : public __formatter_string<_CharT> { using _Base = __formatter_string<_CharT>; @@ -98,8 +98,7 @@ // Formatter char*. template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter<_CharT*, _CharT> - : public formatter { +struct formatter<_CharT*, _CharT> : public formatter { using _Base = formatter; template @@ -110,8 +109,7 @@ // Formatter char[]. template <__fmt_char_type _CharT, size_t _Size> -struct _LIBCPP_TEMPLATE_VIS formatter<_CharT[_Size], _CharT> - : public __formatter_string<_CharT> { +struct formatter<_CharT[_Size], _CharT> : public __formatter_string<_CharT> { using _Base = __formatter_string<_CharT>; template @@ -122,8 +120,7 @@ // Formatter std::string. template <__fmt_char_type _CharT, class _Traits, class _Allocator> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> - : public __formatter_string<_CharT> { +struct formatter, _CharT> : public __formatter_string<_CharT> { using _Base = __formatter_string<_CharT>; template @@ -136,8 +133,7 @@ // Formatter std::string_view. template <__fmt_char_type _CharT, class _Traits> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> - : public __formatter_string<_CharT> { +struct formatter, _CharT> : public __formatter_string<_CharT> { using _Base = __formatter_string<_CharT>; template diff --git a/libcxx/include/__format/formatter_tuple.h b/libcxx/include/__format/formatter_tuple.h --- a/libcxx/include/__format/formatter_tuple.h +++ b/libcxx/include/__format/formatter_tuple.h @@ -39,7 +39,7 @@ #if _LIBCPP_STD_VER >= 23 template <__fmt_char_type _CharT, class _Tuple, formattable<_CharT>... _Args> -struct _LIBCPP_TEMPLATE_VIS __formatter_tuple { +struct __formatter_tuple { _LIBCPP_HIDE_FROM_ABI constexpr void set_separator(basic_string_view<_CharT> __separator) noexcept { __separator_ = __separator; } @@ -141,12 +141,10 @@ }; template <__fmt_char_type _CharT, formattable<_CharT>... _Args> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> - : public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {}; +struct formatter, _CharT> : public __formatter_tuple<_CharT, pair<_Args...>, _Args...> {}; template <__fmt_char_type _CharT, formattable<_CharT>... _Args> -struct _LIBCPP_TEMPLATE_VIS formatter, _CharT> - : public __formatter_tuple<_CharT, tuple<_Args...>, _Args...> {}; +struct formatter, _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 --- a/libcxx/include/__format/parser_std_format_spec.h +++ b/libcxx/include/__format/parser_std_format_spec.h @@ -160,7 +160,7 @@ inline constexpr __fields __fields_fill_align_width{}; # endif -enum class _LIBCPP_ENUM_VIS __alignment : uint8_t { +enum class __alignment : uint8_t { /// No alignment is set in the format string. __default, __left, @@ -169,7 +169,7 @@ __zero_padding }; -enum class _LIBCPP_ENUM_VIS __sign : uint8_t { +enum class __sign : uint8_t { /// No sign is set in the format string. /// /// The sign isn't allowed for certain format-types. By using this value @@ -181,7 +181,7 @@ __space }; -enum class _LIBCPP_ENUM_VIS __type : uint8_t { +enum class __type : uint8_t { __default, __string, __binary_lower_case, @@ -301,7 +301,7 @@ /// 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 _LIBCPP_TEMPLATE_VIS __parser { +class __parser { public: template _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator __parse(_ParseContext& __ctx, __fields __fields) { diff --git a/libcxx/include/__format/range_default_formatter.h b/libcxx/include/__format/range_default_formatter.h --- a/libcxx/include/__format/range_default_formatter.h +++ b/libcxx/include/__format/range_default_formatter.h @@ -52,7 +52,7 @@ // There is no definition of this struct, it's purely intended to be used to // generate diagnostics. template -struct _LIBCPP_TEMPLATE_VIS __instantiated_the_primary_template_of_format_kind; +struct __instantiated_the_primary_template_of_format_kind; template constexpr range_format format_kind = [] { @@ -88,12 +88,12 @@ }(); template -struct _LIBCPP_TEMPLATE_VIS __range_default_formatter; +struct __range_default_formatter; // Required specializations template -struct _LIBCPP_TEMPLATE_VIS __range_default_formatter { +struct __range_default_formatter { private: using __maybe_const_r = __fmt_maybe_const<_Rp, _CharT>; range_formatter>, _CharT> __underlying_; @@ -119,7 +119,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS __range_default_formatter { +struct __range_default_formatter { private: using __maybe_const_map = __fmt_maybe_const<_Rp, _CharT>; using __element_type = remove_cvref_t>; @@ -147,7 +147,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS __range_default_formatter { +struct __range_default_formatter { private: using __maybe_const_set = __fmt_maybe_const<_Rp, _CharT>; using __element_type = remove_cvref_t>; @@ -172,7 +172,7 @@ template requires(_Kp == range_format::string || _Kp == range_format::debug_string) -struct _LIBCPP_TEMPLATE_VIS __range_default_formatter<_Kp, _Rp, _CharT> { +struct __range_default_formatter<_Kp, _Rp, _CharT> { private: // This deviates from the Standard, there the exposition only type is // formatter, charT> underlying_; @@ -211,7 +211,7 @@ template requires(format_kind<_Rp> != range_format::disabled && formattable, _CharT>) -struct _LIBCPP_TEMPLATE_VIS formatter<_Rp, _CharT> : __range_default_formatter, _Rp, _CharT> {}; +struct formatter<_Rp, _CharT> : __range_default_formatter, _Rp, _CharT> {}; #endif //_LIBCPP_STD_VER >= 23 diff --git a/libcxx/include/__format/range_formatter.h b/libcxx/include/__format/range_formatter.h --- a/libcxx/include/__format/range_formatter.h +++ b/libcxx/include/__format/range_formatter.h @@ -40,7 +40,7 @@ template requires same_as, _Tp> && formattable<_Tp, _CharT> -struct _LIBCPP_TEMPLATE_VIS range_formatter { +struct 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 --- a/libcxx/include/__functional/binary_function.h +++ b/libcxx/include/__functional/binary_function.h @@ -21,7 +21,7 @@ #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) template -struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binary_function +struct _LIBCPP_DEPRECATED_IN_CXX11 binary_function { typedef _Arg1 first_argument_type; typedef _Arg2 second_argument_type; diff --git a/libcxx/include/__functional/binary_negate.h b/libcxx/include/__functional/binary_negate.h --- a/libcxx/include/__functional/binary_negate.h +++ b/libcxx/include/__functional/binary_negate.h @@ -22,7 +22,7 @@ #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS) template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 binary_negate +class _LIBCPP_DEPRECATED_IN_CXX17 binary_negate : public __binary_function diff --git a/libcxx/include/__functional/binder1st.h b/libcxx/include/__functional/binder1st.h --- a/libcxx/include/__functional/binder1st.h +++ b/libcxx/include/__functional/binder1st.h @@ -22,7 +22,7 @@ #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st +class _LIBCPP_DEPRECATED_IN_CXX11 binder1st : public __unary_function { protected: diff --git a/libcxx/include/__functional/binder2nd.h b/libcxx/include/__functional/binder2nd.h --- a/libcxx/include/__functional/binder2nd.h +++ b/libcxx/include/__functional/binder2nd.h @@ -22,7 +22,7 @@ #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd +class _LIBCPP_DEPRECATED_IN_CXX11 binder2nd : public __unary_function { protected: diff --git a/libcxx/include/__functional/boyer_moore_searcher.h b/libcxx/include/__functional/boyer_moore_searcher.h --- a/libcxx/include/__functional/boyer_moore_searcher.h +++ b/libcxx/include/__functional/boyer_moore_searcher.h @@ -100,7 +100,7 @@ template ::value_type>, class _BinaryPredicate = equal_to<>> -class _LIBCPP_TEMPLATE_VIS boyer_moore_searcher { +class boyer_moore_searcher { private: using difference_type = typename std::iterator_traits<_RandomAccessIterator1>::difference_type; using value_type = typename std::iterator_traits<_RandomAccessIterator1>::value_type; @@ -232,7 +232,7 @@ template ::value_type>, class _BinaryPredicate = equal_to<>> -class _LIBCPP_TEMPLATE_VIS boyer_moore_horspool_searcher { +class 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 --- a/libcxx/include/__functional/default_searcher.h +++ b/libcxx/include/__functional/default_searcher.h @@ -27,7 +27,7 @@ // default searcher template> -class _LIBCPP_TEMPLATE_VIS default_searcher { +class default_searcher { public: _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 default_searcher(_ForwardIterator __f, _ForwardIterator __l, diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -82,7 +82,7 @@ #endif } -template class _LIBCPP_TEMPLATE_VIS function; // undefined +template class function; // undefined namespace __function { @@ -260,7 +260,7 @@ // __base provides an abstract interface for copyable functors. -template class _LIBCPP_TEMPLATE_VIS __base; +template class __base; template class __base<_Rp(_ArgTypes...)> @@ -971,7 +971,7 @@ } // namespace __function template -class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> +class function<_Rp(_ArgTypes...)> : public __function::__maybe_derive_from_unary_function<_Rp(_ArgTypes...)>, public __function::__maybe_derive_from_binary_function<_Rp(_ArgTypes...)> { diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h --- a/libcxx/include/__functional/hash.h +++ b/libcxx/include/__functional/hash.h @@ -379,8 +379,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS hash<_Tp*> - : public __unary_function<_Tp*, size_t> +struct hash<_Tp*> : public __unary_function<_Tp*, size_t> { _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp* __v) const _NOEXCEPT @@ -396,32 +395,28 @@ }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash: public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(bool __v) const _NOEXCEPT {return static_cast(__v);} }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(char __v) const _NOEXCEPT {return static_cast(__v);} }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(signed char __v) const _NOEXCEPT {return static_cast(__v);} }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned char __v) const _NOEXCEPT {return static_cast(__v);} @@ -429,8 +424,7 @@ #ifndef _LIBCPP_HAS_NO_CHAR8_T template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(char8_t __v) const _NOEXCEPT {return static_cast(__v);} @@ -438,16 +432,14 @@ #endif // !_LIBCPP_HAS_NO_CHAR8_T template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(char16_t __v) const _NOEXCEPT {return static_cast(__v);} }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(char32_t __v) const _NOEXCEPT {return static_cast(__v);} @@ -455,8 +447,7 @@ #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(wchar_t __v) const _NOEXCEPT {return static_cast(__v);} @@ -464,84 +455,65 @@ #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash: public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(short __v) const _NOEXCEPT {return static_cast(__v);} }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned short __v) const _NOEXCEPT {return static_cast(__v);} }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(int __v) const _NOEXCEPT {return static_cast(__v);} }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned int __v) const _NOEXCEPT {return static_cast(__v);} }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(long __v) const _NOEXCEPT {return static_cast(__v);} }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(unsigned long __v) const _NOEXCEPT {return static_cast(__v);} }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __scalar_hash -{ -}; +struct hash : public __scalar_hash {}; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __scalar_hash -{ -}; +struct hash : public __scalar_hash {}; #ifndef _LIBCPP_HAS_NO_INT128 template <> -struct _LIBCPP_TEMPLATE_VIS hash<__int128_t> - : public __scalar_hash<__int128_t> -{ -}; +struct hash<__int128_t> : public __scalar_hash<__int128_t> {}; template <> -struct _LIBCPP_TEMPLATE_VIS hash<__uint128_t> - : public __scalar_hash<__uint128_t> -{ -}; +struct hash<__uint128_t> : public __scalar_hash<__uint128_t> {}; #endif template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __scalar_hash +struct hash : public __scalar_hash { _LIBCPP_HIDE_FROM_ABI size_t operator()(float __v) const _NOEXCEPT @@ -554,8 +526,7 @@ }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __scalar_hash +struct hash : public __scalar_hash { _LIBCPP_HIDE_FROM_ABI size_t operator()(double __v) const _NOEXCEPT @@ -568,8 +539,7 @@ }; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __scalar_hash +struct hash : public __scalar_hash { _LIBCPP_HIDE_FROM_ABI size_t operator()(long double __v) const _NOEXCEPT @@ -618,8 +588,7 @@ }; template ::value> -struct _LIBCPP_TEMPLATE_VIS __enum_hash - : public __unary_function<_Tp, size_t> +struct __enum_hash : public __unary_function<_Tp, size_t> { _LIBCPP_HIDE_FROM_ABI size_t operator()(_Tp __v) const _NOEXCEPT @@ -629,22 +598,21 @@ } }; template -struct _LIBCPP_TEMPLATE_VIS __enum_hash<_Tp, false> { +struct __enum_hash<_Tp, false> { __enum_hash() = delete; __enum_hash(__enum_hash const&) = delete; __enum_hash& operator=(__enum_hash const&) = delete; }; template -struct _LIBCPP_TEMPLATE_VIS hash : public __enum_hash<_Tp> +struct hash : public __enum_hash<_Tp> { }; #if _LIBCPP_STD_VER >= 17 template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(nullptr_t) const _NOEXCEPT { diff --git a/libcxx/include/__functional/mem_fun_ref.h b/libcxx/include/__functional/mem_fun_ref.h --- a/libcxx/include/__functional/mem_fun_ref.h +++ b/libcxx/include/__functional/mem_fun_ref.h @@ -23,8 +23,7 @@ #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_t - : public __unary_function<_Tp*, _Sp> +class _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_t : public __unary_function<_Tp*, _Sp> { _Sp (_Tp::*__p_)(); public: @@ -35,8 +34,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_t - : public __binary_function<_Tp*, _Ap, _Sp> +class _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_t : public __binary_function<_Tp*, _Ap, _Sp> { _Sp (_Tp::*__p_)(_Ap); public: @@ -59,8 +57,7 @@ {return mem_fun1_t<_Sp,_Tp,_Ap>(__f);} template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_ref_t - : public __unary_function<_Tp, _Sp> +class _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_ref_t : public __unary_function<_Tp, _Sp> { _Sp (_Tp::*__p_)(); public: @@ -71,8 +68,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_ref_t - : public __binary_function<_Tp, _Ap, _Sp> +class _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> { _Sp (_Tp::*__p_)(_Ap); public: @@ -95,8 +91,7 @@ {return mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);} template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t - : public __unary_function +class _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t : public __unary_function { _Sp (_Tp::*__p_)() const; public: @@ -107,8 +102,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t - : public __binary_function +class _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t : public __binary_function { _Sp (_Tp::*__p_)(_Ap) const; public: @@ -131,8 +125,7 @@ {return const_mem_fun1_t<_Sp,_Tp,_Ap>(__f);} template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_ref_t - : public __unary_function<_Tp, _Sp> +class _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_ref_t : public __unary_function<_Tp, _Sp> { _Sp (_Tp::*__p_)() const; public: @@ -143,8 +136,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t - : public __binary_function<_Tp, _Ap, _Sp> +class _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> { _Sp (_Tp::*__p_)(_Ap) const; public: diff --git a/libcxx/include/__functional/operations.h b/libcxx/include/__functional/operations.h --- a/libcxx/include/__functional/operations.h +++ b/libcxx/include/__functional/operations.h @@ -31,8 +31,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS plus - : __binary_function<_Tp, _Tp, _Tp> +struct plus : __binary_function<_Tp, _Tp, _Tp> { typedef _Tp __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -51,7 +50,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS plus +struct plus { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -68,8 +67,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS minus - : __binary_function<_Tp, _Tp, _Tp> +struct minus : __binary_function<_Tp, _Tp, _Tp> { typedef _Tp __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -80,7 +78,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS minus +struct minus { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -97,8 +95,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS multiplies - : __binary_function<_Tp, _Tp, _Tp> +struct multiplies : __binary_function<_Tp, _Tp, _Tp> { typedef _Tp __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -109,7 +106,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS multiplies +struct multiplies { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -126,8 +123,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS divides - : __binary_function<_Tp, _Tp, _Tp> +struct divides : __binary_function<_Tp, _Tp, _Tp> { typedef _Tp __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -138,7 +134,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS divides +struct divides { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -155,8 +151,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS modulus - : __binary_function<_Tp, _Tp, _Tp> +struct modulus : __binary_function<_Tp, _Tp, _Tp> { typedef _Tp __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -167,7 +162,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS modulus +struct modulus { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -184,8 +179,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS negate - : __unary_function<_Tp, _Tp> +struct negate : __unary_function<_Tp, _Tp> { typedef _Tp __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -196,7 +190,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS negate +struct negate { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -215,8 +209,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS bit_and - : __binary_function<_Tp, _Tp, _Tp> +struct bit_and : __binary_function<_Tp, _Tp, _Tp> { typedef _Tp __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -227,7 +220,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS bit_and +struct bit_and { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -241,8 +234,7 @@ #if _LIBCPP_STD_VER >= 14 template -struct _LIBCPP_TEMPLATE_VIS bit_not - : __unary_function<_Tp, _Tp> +struct bit_not : __unary_function<_Tp, _Tp> { _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY _Tp operator()(const _Tp& __x) const @@ -251,7 +243,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(bit_not); template <> -struct _LIBCPP_TEMPLATE_VIS bit_not +struct bit_not { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -268,8 +260,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS bit_or - : __binary_function<_Tp, _Tp, _Tp> +struct bit_or : __binary_function<_Tp, _Tp, _Tp> { typedef _Tp __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -280,7 +271,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS bit_or +struct bit_or { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -297,8 +288,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS bit_xor - : __binary_function<_Tp, _Tp, _Tp> +struct bit_xor : __binary_function<_Tp, _Tp, _Tp> { typedef _Tp __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -309,7 +299,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS bit_xor +struct bit_xor { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -328,8 +318,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS equal_to - : __binary_function<_Tp, _Tp, bool> +struct equal_to : __binary_function<_Tp, _Tp, bool> { typedef bool __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -340,7 +329,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS equal_to +struct equal_to { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -365,8 +354,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS not_equal_to - : __binary_function<_Tp, _Tp, bool> +struct not_equal_to : __binary_function<_Tp, _Tp, bool> { typedef bool __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -377,7 +365,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS not_equal_to +struct not_equal_to { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -394,8 +382,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS less - : __binary_function<_Tp, _Tp, bool> +struct less : __binary_function<_Tp, _Tp, bool> { typedef bool __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -406,7 +393,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS less +struct less { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -423,8 +410,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS less_equal - : __binary_function<_Tp, _Tp, bool> +struct less_equal : __binary_function<_Tp, _Tp, bool> { typedef bool __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -435,7 +421,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS less_equal +struct less_equal { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -452,8 +438,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS greater_equal - : __binary_function<_Tp, _Tp, bool> +struct greater_equal : __binary_function<_Tp, _Tp, bool> { typedef bool __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -464,7 +449,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS greater_equal +struct greater_equal { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -481,8 +466,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS greater - : __binary_function<_Tp, _Tp, bool> +struct greater : __binary_function<_Tp, _Tp, bool> { typedef bool __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -493,7 +477,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS greater +struct greater { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -512,8 +496,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS logical_and - : __binary_function<_Tp, _Tp, bool> +struct logical_and : __binary_function<_Tp, _Tp, bool> { typedef bool __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -524,7 +507,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS logical_and +struct logical_and { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -541,8 +524,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS logical_not - : __unary_function<_Tp, bool> +struct logical_not : __unary_function<_Tp, bool> { typedef bool __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -553,7 +535,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS logical_not +struct logical_not { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -570,8 +552,7 @@ #else template #endif -struct _LIBCPP_TEMPLATE_VIS logical_or - : __binary_function<_Tp, _Tp, bool> +struct logical_or : __binary_function<_Tp, _Tp, bool> { typedef bool __result_type; // used by valarray _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY @@ -582,7 +563,7 @@ #if _LIBCPP_STD_VER >= 14 template <> -struct _LIBCPP_TEMPLATE_VIS logical_or +struct logical_or { template _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/__functional/pointer_to_binary_function.h b/libcxx/include/__functional/pointer_to_binary_function.h --- a/libcxx/include/__functional/pointer_to_binary_function.h +++ b/libcxx/include/__functional/pointer_to_binary_function.h @@ -22,8 +22,7 @@ #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function - : public __binary_function<_Arg1, _Arg2, _Result> +class _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function : public __binary_function<_Arg1, _Arg2, _Result> { _Result (*__f_)(_Arg1, _Arg2); public: diff --git a/libcxx/include/__functional/pointer_to_unary_function.h b/libcxx/include/__functional/pointer_to_unary_function.h --- a/libcxx/include/__functional/pointer_to_unary_function.h +++ b/libcxx/include/__functional/pointer_to_unary_function.h @@ -22,8 +22,7 @@ #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function - : public __unary_function<_Arg, _Result> +class _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function : public __unary_function<_Arg, _Result> { _Result (*__f_)(_Arg); public: diff --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h --- a/libcxx/include/__functional/reference_wrapper.h +++ b/libcxx/include/__functional/reference_wrapper.h @@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp> +class reference_wrapper : public __weak_result_type<_Tp> { public: // types diff --git a/libcxx/include/__functional/unary_function.h b/libcxx/include/__functional/unary_function.h --- a/libcxx/include/__functional/unary_function.h +++ b/libcxx/include/__functional/unary_function.h @@ -20,7 +20,7 @@ #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) template -struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 unary_function +struct _LIBCPP_DEPRECATED_IN_CXX11 unary_function { typedef _Arg argument_type; typedef _Result result_type; diff --git a/libcxx/include/__functional/unary_negate.h b/libcxx/include/__functional/unary_negate.h --- a/libcxx/include/__functional/unary_negate.h +++ b/libcxx/include/__functional/unary_negate.h @@ -22,7 +22,7 @@ #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS) template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 unary_negate +class _LIBCPP_DEPRECATED_IN_CXX17 unary_negate : public __unary_function { _Predicate __pred_; diff --git a/libcxx/include/__fwd/array.h b/libcxx/include/__fwd/array.h --- a/libcxx/include/__fwd/array.h +++ b/libcxx/include/__fwd/array.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS array; +struct array; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__fwd/fstream.h b/libcxx/include/__fwd/fstream.h --- a/libcxx/include/__fwd/fstream.h +++ b/libcxx/include/__fwd/fstream.h @@ -19,13 +19,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template > -class _LIBCPP_TEMPLATE_VIS basic_filebuf; +class basic_filebuf; template > -class _LIBCPP_TEMPLATE_VIS basic_ifstream; +class basic_ifstream; template > -class _LIBCPP_TEMPLATE_VIS basic_ofstream; +class basic_ofstream; template > -class _LIBCPP_TEMPLATE_VIS basic_fstream; +class basic_fstream; using filebuf = basic_filebuf; using ifstream = basic_ifstream; diff --git a/libcxx/include/__fwd/hash.h b/libcxx/include/__fwd/hash.h --- a/libcxx/include/__fwd/hash.h +++ b/libcxx/include/__fwd/hash.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS hash; +struct hash; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__fwd/ios.h b/libcxx/include/__fwd/ios.h --- a/libcxx/include/__fwd/ios.h +++ b/libcxx/include/__fwd/ios.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template > -class _LIBCPP_TEMPLATE_VIS basic_ios; +class basic_ios; using ios = basic_ios; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS diff --git a/libcxx/include/__fwd/istream.h b/libcxx/include/__fwd/istream.h --- a/libcxx/include/__fwd/istream.h +++ b/libcxx/include/__fwd/istream.h @@ -19,10 +19,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD template > -class _LIBCPP_TEMPLATE_VIS basic_istream; +class basic_istream; template > -class _LIBCPP_TEMPLATE_VIS basic_iostream; +class basic_iostream; using istream = basic_istream; using iostream = basic_iostream; diff --git a/libcxx/include/__fwd/memory_resource.h b/libcxx/include/__fwd/memory_resource.h --- a/libcxx/include/__fwd/memory_resource.h +++ b/libcxx/include/__fwd/memory_resource.h @@ -19,7 +19,7 @@ namespace pmr { template -class _LIBCPP_TEMPLATE_VIS polymorphic_allocator; +class polymorphic_allocator; } // namespace pmr _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__fwd/ostream.h b/libcxx/include/__fwd/ostream.h --- a/libcxx/include/__fwd/ostream.h +++ b/libcxx/include/__fwd/ostream.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template > -class _LIBCPP_TEMPLATE_VIS basic_ostream; +class basic_ostream; using ostream = basic_ostream; diff --git a/libcxx/include/__fwd/pair.h b/libcxx/include/__fwd/pair.h --- a/libcxx/include/__fwd/pair.h +++ b/libcxx/include/__fwd/pair.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS pair; +struct pair; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__fwd/sstream.h b/libcxx/include/__fwd/sstream.h --- a/libcxx/include/__fwd/sstream.h +++ b/libcxx/include/__fwd/sstream.h @@ -19,14 +19,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD template , class _Allocator = allocator<_CharT> > -class _LIBCPP_TEMPLATE_VIS basic_stringbuf; +class basic_stringbuf; template , class _Allocator = allocator<_CharT> > -class _LIBCPP_TEMPLATE_VIS basic_istringstream; +class basic_istringstream; template , class _Allocator = allocator<_CharT> > -class _LIBCPP_TEMPLATE_VIS basic_ostringstream; +class basic_ostringstream; template , class _Allocator = allocator<_CharT> > -class _LIBCPP_TEMPLATE_VIS basic_stringstream; +class basic_stringstream; using stringbuf = basic_stringbuf; using istringstream = basic_istringstream; diff --git a/libcxx/include/__fwd/streambuf.h b/libcxx/include/__fwd/streambuf.h --- a/libcxx/include/__fwd/streambuf.h +++ b/libcxx/include/__fwd/streambuf.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template > -class _LIBCPP_TEMPLATE_VIS basic_streambuf; +class basic_streambuf; using streambuf = basic_streambuf; diff --git a/libcxx/include/__fwd/string.h b/libcxx/include/__fwd/string.h --- a/libcxx/include/__fwd/string.h +++ b/libcxx/include/__fwd/string.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS char_traits; +struct char_traits; template <> struct char_traits; @@ -39,10 +39,10 @@ #endif template -class _LIBCPP_TEMPLATE_VIS allocator; +class allocator; template , class _Allocator = allocator<_CharT> > -class _LIBCPP_TEMPLATE_VIS basic_string; +class basic_string; using string = basic_string; diff --git a/libcxx/include/__fwd/string_view.h b/libcxx/include/__fwd/string_view.h --- a/libcxx/include/__fwd/string_view.h +++ b/libcxx/include/__fwd/string_view.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template > -class _LIBCPP_TEMPLATE_VIS basic_string_view; +class basic_string_view; typedef basic_string_view string_view; #ifndef _LIBCPP_HAS_NO_CHAR8_T diff --git a/libcxx/include/__fwd/subrange.h b/libcxx/include/__fwd/subrange.h --- a/libcxx/include/__fwd/subrange.h +++ b/libcxx/include/__fwd/subrange.h @@ -23,11 +23,11 @@ namespace ranges { -enum class _LIBCPP_ENUM_VIS subrange_kind : bool { unsized, sized }; +enum class subrange_kind : bool { unsized, sized }; template _Sent, subrange_kind _Kind> requires(_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>) -class _LIBCPP_TEMPLATE_VIS subrange; +class subrange; } // namespace ranges diff --git a/libcxx/include/__fwd/tuple.h b/libcxx/include/__fwd/tuple.h --- a/libcxx/include/__fwd/tuple.h +++ b/libcxx/include/__fwd/tuple.h @@ -20,7 +20,7 @@ #ifndef _LIBCPP_CXX03_LANG template -class _LIBCPP_TEMPLATE_VIS tuple; +class tuple; #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -149,12 +149,12 @@ template class __hash_table; -template class _LIBCPP_TEMPLATE_VIS __hash_iterator; -template class _LIBCPP_TEMPLATE_VIS __hash_const_iterator; -template class _LIBCPP_TEMPLATE_VIS __hash_local_iterator; -template class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator; -template class _LIBCPP_TEMPLATE_VIS __hash_map_iterator; -template class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator; +template class __hash_iterator; +template class __hash_const_iterator; +template class __hash_local_iterator; +template class __hash_const_local_iterator; +template class __hash_map_iterator; +template class __hash_map_const_iterator; template struct __hash_key_value_types { @@ -293,7 +293,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS __hash_iterator +class __hash_iterator { typedef __hash_node_types<_NodePtr> _NodeTypes; typedef _NodePtr __node_pointer; @@ -388,14 +388,14 @@ #endif } template friend class __hash_table; - template friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator; - template friend class _LIBCPP_TEMPLATE_VIS __hash_map_iterator; - template friend class _LIBCPP_TEMPLATE_VIS unordered_map; - template friend class _LIBCPP_TEMPLATE_VIS unordered_multimap; + template friend class __hash_const_iterator; + template friend class __hash_map_iterator; + template friend class unordered_map; + template friend class unordered_multimap; }; template -class _LIBCPP_TEMPLATE_VIS __hash_const_iterator +class __hash_const_iterator { static_assert(!is_const::element_type>::value, ""); typedef __hash_node_types<_NodePtr> _NodeTypes; @@ -502,13 +502,13 @@ #endif } template friend class __hash_table; - template friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator; - template friend class _LIBCPP_TEMPLATE_VIS unordered_map; - template friend class _LIBCPP_TEMPLATE_VIS unordered_multimap; + template friend class __hash_map_const_iterator; + template friend class unordered_map; + template friend class unordered_multimap; }; template -class _LIBCPP_TEMPLATE_VIS __hash_local_iterator +class __hash_local_iterator { typedef __hash_node_types<_NodePtr> _NodeTypes; typedef _NodePtr __node_pointer; @@ -616,12 +616,12 @@ __node_ = __node_->__next_; } template friend class __hash_table; - template friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator; - template friend class _LIBCPP_TEMPLATE_VIS __hash_map_iterator; + template friend class __hash_const_local_iterator; + template friend class __hash_map_iterator; }; template -class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator +class __hash_const_local_iterator { typedef __hash_node_types<_ConstNodePtr> _NodeTypes; typedef _ConstNodePtr __node_pointer; @@ -749,7 +749,7 @@ __node_ = __node_->__next_; } template friend class __hash_table; - template friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator; + template friend class __hash_map_const_iterator; }; template @@ -1361,8 +1361,8 @@ _LIBCPP_HIDE_FROM_ABI void __deallocate_node(__next_pointer __np) _NOEXCEPT; _LIBCPP_HIDE_FROM_ABI __next_pointer __detach() _NOEXCEPT; - template friend class _LIBCPP_TEMPLATE_VIS unordered_map; - template friend class _LIBCPP_TEMPLATE_VIS unordered_multimap; + template friend class unordered_map; + template friend class unordered_multimap; }; template diff --git a/libcxx/include/__ios/fpos.h b/libcxx/include/__ios/fpos.h --- a/libcxx/include/__ios/fpos.h +++ b/libcxx/include/__ios/fpos.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS fpos { +class fpos { private: _StateT __st_; streamoff __off_; diff --git a/libcxx/include/__iterator/back_insert_iterator.h b/libcxx/include/__iterator/back_insert_iterator.h --- a/libcxx/include/__iterator/back_insert_iterator.h +++ b/libcxx/include/__iterator/back_insert_iterator.h @@ -25,7 +25,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template -class _LIBCPP_TEMPLATE_VIS back_insert_iterator +class back_insert_iterator #if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) : public iterator #endif diff --git a/libcxx/include/__iterator/front_insert_iterator.h b/libcxx/include/__iterator/front_insert_iterator.h --- a/libcxx/include/__iterator/front_insert_iterator.h +++ b/libcxx/include/__iterator/front_insert_iterator.h @@ -25,7 +25,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template -class _LIBCPP_TEMPLATE_VIS front_insert_iterator +class front_insert_iterator #if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) : public iterator #endif diff --git a/libcxx/include/__iterator/insert_iterator.h b/libcxx/include/__iterator/insert_iterator.h --- a/libcxx/include/__iterator/insert_iterator.h +++ b/libcxx/include/__iterator/insert_iterator.h @@ -34,7 +34,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template -class _LIBCPP_TEMPLATE_VIS insert_iterator +class insert_iterator #if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) : public iterator #endif diff --git a/libcxx/include/__iterator/istream_iterator.h b/libcxx/include/__iterator/istream_iterator.h --- a/libcxx/include/__iterator/istream_iterator.h +++ b/libcxx/include/__iterator/istream_iterator.h @@ -27,7 +27,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template , class _Distance = ptrdiff_t> -class _LIBCPP_TEMPLATE_VIS istream_iterator +class istream_iterator #if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) : public iterator #endif diff --git a/libcxx/include/__iterator/istreambuf_iterator.h b/libcxx/include/__iterator/istreambuf_iterator.h --- a/libcxx/include/__iterator/istreambuf_iterator.h +++ b/libcxx/include/__iterator/istreambuf_iterator.h @@ -24,7 +24,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template -class _LIBCPP_TEMPLATE_VIS istreambuf_iterator +class istreambuf_iterator #if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) : public iterator -struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator +struct _LIBCPP_DEPRECATED_IN_CXX17 iterator { typedef _Tp value_type; typedef _Distance difference_type; diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h --- a/libcxx/include/__iterator/iterator_traits.h +++ b/libcxx/include/__iterator/iterator_traits.h @@ -65,15 +65,15 @@ #endif // _LIBCPP_STD_VER >= 20 template -struct _LIBCPP_TEMPLATE_VIS iterator_traits; +struct 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 input_iterator_tag {}; +struct output_iterator_tag {}; +struct forward_iterator_tag : public input_iterator_tag {}; +struct bidirectional_iterator_tag : public forward_iterator_tag {}; +struct 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 contiguous_iterator_tag : public random_access_iterator_tag {}; #endif template @@ -413,8 +413,7 @@ // the client expects instead of failing at compile time. template -struct _LIBCPP_TEMPLATE_VIS iterator_traits - : __iterator_traits<_Iter, __has_iterator_typedefs<_Iter>::value> { +struct iterator_traits : __iterator_traits<_Iter, __has_iterator_typedefs<_Iter>::value> { using __primary_template = iterator_traits; }; @@ -424,7 +423,7 @@ #if _LIBCPP_STD_VER >= 20 requires is_object_v<_Tp> #endif -struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*> +struct iterator_traits<_Tp*> { typedef ptrdiff_t difference_type; typedef __remove_cv_t<_Tp> value_type; diff --git a/libcxx/include/__iterator/move_iterator.h b/libcxx/include/__iterator/move_iterator.h --- a/libcxx/include/__iterator/move_iterator.h +++ b/libcxx/include/__iterator/move_iterator.h @@ -62,7 +62,7 @@ #endif // _LIBCPP_STD_VER >= 20 template -class _LIBCPP_TEMPLATE_VIS move_iterator +class move_iterator #if _LIBCPP_STD_VER >= 20 : public __move_iter_category_base<_Iter> #endif diff --git a/libcxx/include/__iterator/move_sentinel.h b/libcxx/include/__iterator/move_sentinel.h --- a/libcxx/include/__iterator/move_sentinel.h +++ b/libcxx/include/__iterator/move_sentinel.h @@ -24,7 +24,7 @@ #if _LIBCPP_STD_VER >= 20 template -class _LIBCPP_TEMPLATE_VIS move_sentinel +class move_sentinel { public: _LIBCPP_HIDE_FROM_ABI diff --git a/libcxx/include/__iterator/ostream_iterator.h b/libcxx/include/__iterator/ostream_iterator.h --- a/libcxx/include/__iterator/ostream_iterator.h +++ b/libcxx/include/__iterator/ostream_iterator.h @@ -25,7 +25,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template > -class _LIBCPP_TEMPLATE_VIS ostream_iterator +class ostream_iterator #if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) : public iterator #endif diff --git a/libcxx/include/__iterator/ostreambuf_iterator.h b/libcxx/include/__iterator/ostreambuf_iterator.h --- a/libcxx/include/__iterator/ostreambuf_iterator.h +++ b/libcxx/include/__iterator/ostreambuf_iterator.h @@ -24,7 +24,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template -class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator +class ostreambuf_iterator #if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) : public iterator #endif diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h --- a/libcxx/include/__iterator/reverse_iterator.h +++ b/libcxx/include/__iterator/reverse_iterator.h @@ -48,7 +48,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template -class _LIBCPP_TEMPLATE_VIS reverse_iterator +class reverse_iterator #if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) : public iterator::iterator_category, typename iterator_traits<_Iter>::value_type, diff --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h --- a/libcxx/include/__iterator/wrap_iter.h +++ b/libcxx/include/__iterator/wrap_iter.h @@ -148,8 +148,8 @@ template friend class __wrap_iter; template friend class basic_string; - template friend class _LIBCPP_TEMPLATE_VIS vector; - template friend class _LIBCPP_TEMPLATE_VIS span; + template friend class vector; + template friend class span; }; template @@ -269,7 +269,7 @@ #endif template -struct _LIBCPP_TEMPLATE_VIS pointer_traits<__wrap_iter<_It> > +struct pointer_traits<__wrap_iter<_It> > { typedef __wrap_iter<_It> pointer; typedef typename pointer_traits<_It>::element_type element_type; diff --git a/libcxx/include/__locale b/libcxx/include/__locale --- a/libcxx/include/__locale +++ b/libcxx/include/__locale @@ -205,8 +205,7 @@ // template class collate; template -class _LIBCPP_TEMPLATE_VIS collate - : public locale::facet +class collate : public locale::facet { public: typedef _CharT char_type; @@ -294,7 +293,7 @@ // template class collate_byname; -template class _LIBCPP_TEMPLATE_VIS collate_byname; +template class collate_byname; template <> class _LIBCPP_TYPE_VIS collate_byname @@ -501,7 +500,8 @@ "__regex_word can't overlap other bits"); }; -template class _LIBCPP_TEMPLATE_VIS ctype; +template +class ctype; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> @@ -734,7 +734,8 @@ // template class ctype_byname; -template class _LIBCPP_TEMPLATE_VIS ctype_byname; +template +class ctype_byname; template <> class _LIBCPP_TYPE_VIS ctype_byname @@ -902,7 +903,8 @@ // template class codecvt; -template class _LIBCPP_TEMPLATE_VIS codecvt; +template +class codecvt; // template <> class codecvt @@ -1430,8 +1432,7 @@ // template class codecvt_byname template -class _LIBCPP_TEMPLATE_VIS codecvt_byname - : public codecvt<_InternT, _ExternT, _StateT> +class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> { public: _LIBCPP_INLINE_VISIBILITY @@ -1652,7 +1653,7 @@ // template class numpunct -template class _LIBCPP_TEMPLATE_VIS numpunct; +template class numpunct; template <> class _LIBCPP_TYPE_VIS numpunct @@ -1720,7 +1721,7 @@ // template class numpunct_byname -template class _LIBCPP_TEMPLATE_VIS numpunct_byname; +template class numpunct_byname; template <> class _LIBCPP_TYPE_VIS numpunct_byname diff --git a/libcxx/include/__memory/allocator.h b/libcxx/include/__memory/allocator.h --- a/libcxx/include/__memory/allocator.h +++ b/libcxx/include/__memory/allocator.h @@ -34,7 +34,7 @@ // These specializations shouldn't be marked _LIBCPP_DEPRECATED_IN_CXX17. // Specializing allocator is deprecated, but not using it. template <> -class _LIBCPP_TEMPLATE_VIS allocator +class allocator { #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) public: @@ -47,7 +47,7 @@ }; template <> -class _LIBCPP_TEMPLATE_VIS allocator +class allocator { #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS) public: @@ -87,8 +87,7 @@ // allocator trivial in C++20. template -class _LIBCPP_TEMPLATE_VIS allocator - : private __non_trivial_if::value, allocator<_Tp> > +class allocator : private __non_trivial_if::value, allocator<_Tp> > { static_assert(!is_volatile<_Tp>::value, "std::allocator does not support volatile types"); public: @@ -175,8 +174,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS allocator - : private __non_trivial_if::value, allocator > +class allocator : private __non_trivial_if::value, allocator > { static_assert(!is_volatile<_Tp>::value, "std::allocator does not support volatile types"); public: diff --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h --- 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 { explicit allocator_arg_t() = default; }; +struct allocator_arg_t { explicit allocator_arg_t() = default; }; #if _LIBCPP_STD_VER >= 17 inline constexpr allocator_arg_t allocator_arg = allocator_arg_t(); diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -232,7 +232,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP template -struct _LIBCPP_TEMPLATE_VIS allocator_traits +struct allocator_traits { using allocator_type = _Alloc; using value_type = typename allocator_type::value_type; diff --git a/libcxx/include/__memory/auto_ptr.h b/libcxx/include/__memory/auto_ptr.h --- a/libcxx/include/__memory/auto_ptr.h +++ b/libcxx/include/__memory/auto_ptr.h @@ -27,7 +27,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr +class _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr { private: _Tp* __ptr_; @@ -71,7 +71,7 @@ }; template <> -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr +class _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr { public: typedef void element_type; diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h --- a/libcxx/include/__memory/pointer_traits.h +++ b/libcxx/include/__memory/pointer_traits.h @@ -112,7 +112,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS pointer_traits +struct pointer_traits { typedef _Ptr pointer; typedef typename __pointer_traits_element_type::type element_type; @@ -134,7 +134,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*> +struct pointer_traits<_Tp*> { typedef _Tp* pointer; typedef _Tp element_type; diff --git a/libcxx/include/__memory/raw_storage_iterator.h b/libcxx/include/__memory/raw_storage_iterator.h --- a/libcxx/include/__memory/raw_storage_iterator.h +++ b/libcxx/include/__memory/raw_storage_iterator.h @@ -28,7 +28,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 raw_storage_iterator +class _LIBCPP_DEPRECATED_IN_CXX17 raw_storage_iterator #if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES) : public iterator #endif diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -140,7 +140,7 @@ #endif } -template class _LIBCPP_TEMPLATE_VIS weak_ptr; +template class weak_ptr; class _LIBCPP_TYPE_VIS __shared_count { @@ -372,7 +372,7 @@ struct __shared_ptr_dummy_rebind_allocator_type; template <> -class _LIBCPP_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type> +class allocator<__shared_ptr_dummy_rebind_allocator_type> { public: template @@ -382,7 +382,7 @@ }; }; -template class _LIBCPP_TEMPLATE_VIS enable_shared_from_this; +template class 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* @@ -471,7 +471,7 @@ #endif template -class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr +class _LIBCPP_SHARED_PTR_TRIVIAL_ABI shared_ptr { public: #if _LIBCPP_STD_VER >= 17 @@ -986,8 +986,8 @@ : default_delete<_Yp[]> { }; - template friend class _LIBCPP_TEMPLATE_VIS shared_ptr; - template friend class _LIBCPP_TEMPLATE_VIS weak_ptr; + template friend class shared_ptr; + template friend class weak_ptr; }; #if _LIBCPP_STD_VER >= 17 @@ -1559,7 +1559,7 @@ #endif // _LIBCPP_HAS_NO_RTTI template -class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr +class _LIBCPP_SHARED_PTR_TRIVIAL_ABI weak_ptr { public: #if _LIBCPP_STD_VER >= 17 @@ -1643,8 +1643,8 @@ bool owner_before(const weak_ptr<_Up>& __r) const _NOEXCEPT {return __cntrl_ < __r.__cntrl_;} - template friend class _LIBCPP_TEMPLATE_VIS weak_ptr; - template friend class _LIBCPP_TEMPLATE_VIS shared_ptr; + template friend class weak_ptr; + template friend class shared_ptr; }; #if _LIBCPP_STD_VER >= 17 @@ -1831,8 +1831,7 @@ template -struct _LIBCPP_TEMPLATE_VIS owner_less > - : __binary_function, shared_ptr<_Tp>, bool> +struct owner_less > : __binary_function, shared_ptr<_Tp>, bool> { _LIBCPP_INLINE_VISIBILITY bool operator()(shared_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT @@ -1846,8 +1845,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS owner_less > - : __binary_function, weak_ptr<_Tp>, bool> +struct owner_less > : __binary_function, weak_ptr<_Tp>, bool> { _LIBCPP_INLINE_VISIBILITY bool operator()( weak_ptr<_Tp> const& __x, weak_ptr<_Tp> const& __y) const _NOEXCEPT @@ -1862,7 +1860,7 @@ #if _LIBCPP_STD_VER >= 17 template <> -struct _LIBCPP_TEMPLATE_VIS owner_less +struct owner_less { template _LIBCPP_INLINE_VISIBILITY @@ -1885,7 +1883,7 @@ #endif template -class _LIBCPP_TEMPLATE_VIS enable_shared_from_this +class enable_shared_from_this { mutable weak_ptr<_Tp> __weak_this_; protected: @@ -1919,10 +1917,10 @@ template friend class shared_ptr; }; -template struct _LIBCPP_TEMPLATE_VIS hash; +template struct hash; template -struct _LIBCPP_TEMPLATE_VIS hash > +struct hash > { #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS) _LIBCPP_DEPRECATED_IN_CXX17 typedef shared_ptr<_Tp> argument_type; diff --git a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h --- a/libcxx/include/__memory/unique_ptr.h +++ b/libcxx/include/__memory/unique_ptr.h @@ -47,7 +47,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS default_delete { +struct default_delete { static_assert(!is_function<_Tp>::value, "default_delete cannot be instantiated for function types"); #ifndef _LIBCPP_CXX03_LANG @@ -67,7 +67,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS default_delete<_Tp[]> { +struct default_delete<_Tp[]> { private: template struct _EnableIfConvertible @@ -121,7 +121,7 @@ #endif template > -class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr { +class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI unique_ptr { public: typedef _Tp element_type; typedef _Dp deleter_type; @@ -304,7 +304,7 @@ template -class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp> { +class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI unique_ptr<_Tp[], _Dp> { public: typedef _Tp element_type; typedef _Dp deleter_type; @@ -718,13 +718,13 @@ #endif // _LIBCPP_STD_VER >= 20 -template struct _LIBCPP_TEMPLATE_VIS hash; +template struct hash; template #ifdef _LIBCPP_CXX03_LANG -struct _LIBCPP_TEMPLATE_VIS hash > +struct hash > #else -struct _LIBCPP_TEMPLATE_VIS hash<__enable_hash_helper< +struct hash<__enable_hash_helper< unique_ptr<_Tp, _Dp>, typename unique_ptr<_Tp, _Dp>::pointer> > #endif { diff --git a/libcxx/include/__memory/uses_allocator.h b/libcxx/include/__memory/uses_allocator.h --- a/libcxx/include/__memory/uses_allocator.h +++ b/libcxx/include/__memory/uses_allocator.h @@ -44,10 +44,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS uses_allocator - : public __uses_allocator<_Tp, _Alloc> -{ -}; +struct uses_allocator : public __uses_allocator<_Tp, _Alloc> {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__memory_resource/polymorphic_allocator.h b/libcxx/include/__memory_resource/polymorphic_allocator.h --- a/libcxx/include/__memory_resource/polymorphic_allocator.h +++ b/libcxx/include/__memory_resource/polymorphic_allocator.h @@ -39,7 +39,7 @@ = byte # endif > -class _LIBCPP_TEMPLATE_VIS polymorphic_allocator { +class polymorphic_allocator { public: using value_type = _ValueType; diff --git a/libcxx/include/__mutex/lock_guard.h b/libcxx/include/__mutex/lock_guard.h --- a/libcxx/include/__mutex/lock_guard.h +++ b/libcxx/include/__mutex/lock_guard.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) lock_guard { +class _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) lock_guard { public: typedef _Mutex mutex_type; diff --git a/libcxx/include/__mutex/unique_lock.h b/libcxx/include/__mutex/unique_lock.h --- a/libcxx/include/__mutex/unique_lock.h +++ b/libcxx/include/__mutex/unique_lock.h @@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS unique_lock { +class unique_lock { public: typedef _Mutex mutex_type; diff --git a/libcxx/include/__node_handle b/libcxx/include/__node_handle --- a/libcxx/include/__node_handle +++ b/libcxx/include/__node_handle @@ -78,7 +78,7 @@ template class _MapOrSetSpecifics> -class _LIBCPP_TEMPLATE_VIS __basic_node_handle +class __basic_node_handle : public _MapOrSetSpecifics< _NodeType, __basic_node_handle<_NodeType, _Alloc, _MapOrSetSpecifics>> @@ -240,7 +240,7 @@ __basic_node_handle< _NodeType, _Alloc, __map_node_handle_specifics>; template -struct _LIBCPP_TEMPLATE_VIS __insert_return_type +struct __insert_return_type { _Iterator position; bool inserted; diff --git a/libcxx/include/__random/bernoulli_distribution.h b/libcxx/include/__random/bernoulli_distribution.h --- a/libcxx/include/__random/bernoulli_distribution.h +++ b/libcxx/include/__random/bernoulli_distribution.h @@ -23,13 +23,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD -class _LIBCPP_TEMPLATE_VIS bernoulli_distribution +class bernoulli_distribution { public: // types typedef bool result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class param_type { double __p_; public: diff --git a/libcxx/include/__random/binomial_distribution.h b/libcxx/include/__random/binomial_distribution.h --- a/libcxx/include/__random/binomial_distribution.h +++ b/libcxx/include/__random/binomial_distribution.h @@ -25,14 +25,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS binomial_distribution +class 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 param_type { result_type __t_; double __p_; diff --git a/libcxx/include/__random/cauchy_distribution.h b/libcxx/include/__random/cauchy_distribution.h --- a/libcxx/include/__random/cauchy_distribution.h +++ b/libcxx/include/__random/cauchy_distribution.h @@ -26,13 +26,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS cauchy_distribution +class cauchy_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class 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 --- a/libcxx/include/__random/chi_squared_distribution.h +++ b/libcxx/include/__random/chi_squared_distribution.h @@ -24,13 +24,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS chi_squared_distribution +class chi_squared_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class param_type { result_type __n_; public: diff --git a/libcxx/include/__random/discard_block_engine.h b/libcxx/include/__random/discard_block_engine.h --- a/libcxx/include/__random/discard_block_engine.h +++ b/libcxx/include/__random/discard_block_engine.h @@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS discard_block_engine +class discard_block_engine { _Engine __e_; int __n_; diff --git a/libcxx/include/__random/discrete_distribution.h b/libcxx/include/__random/discrete_distribution.h --- a/libcxx/include/__random/discrete_distribution.h +++ b/libcxx/include/__random/discrete_distribution.h @@ -28,14 +28,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS discrete_distribution +class 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 param_type { vector __p_; public: diff --git a/libcxx/include/__random/exponential_distribution.h b/libcxx/include/__random/exponential_distribution.h --- a/libcxx/include/__random/exponential_distribution.h +++ b/libcxx/include/__random/exponential_distribution.h @@ -27,13 +27,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS exponential_distribution +class exponential_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class param_type { result_type __lambda_; public: diff --git a/libcxx/include/__random/extreme_value_distribution.h b/libcxx/include/__random/extreme_value_distribution.h --- a/libcxx/include/__random/extreme_value_distribution.h +++ b/libcxx/include/__random/extreme_value_distribution.h @@ -26,13 +26,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS extreme_value_distribution +class extreme_value_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class 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 --- a/libcxx/include/__random/fisher_f_distribution.h +++ b/libcxx/include/__random/fisher_f_distribution.h @@ -25,13 +25,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS fisher_f_distribution +class fisher_f_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class param_type { result_type __m_; result_type __n_; diff --git a/libcxx/include/__random/gamma_distribution.h b/libcxx/include/__random/gamma_distribution.h --- a/libcxx/include/__random/gamma_distribution.h +++ b/libcxx/include/__random/gamma_distribution.h @@ -27,13 +27,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS gamma_distribution +class gamma_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class param_type { result_type __alpha_; result_type __beta_; diff --git a/libcxx/include/__random/geometric_distribution.h b/libcxx/include/__random/geometric_distribution.h --- a/libcxx/include/__random/geometric_distribution.h +++ b/libcxx/include/__random/geometric_distribution.h @@ -25,14 +25,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS geometric_distribution +class 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 param_type { double __p_; public: diff --git a/libcxx/include/__random/independent_bits_engine.h b/libcxx/include/__random/independent_bits_engine.h --- a/libcxx/include/__random/independent_bits_engine.h +++ b/libcxx/include/__random/independent_bits_engine.h @@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS independent_bits_engine +class independent_bits_engine { template class __get_n diff --git a/libcxx/include/__random/linear_congruential_engine.h b/libcxx/include/__random/linear_congruential_engine.h --- a/libcxx/include/__random/linear_congruential_engine.h +++ b/libcxx/include/__random/linear_congruential_engine.h @@ -189,7 +189,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS linear_congruential_engine; +class linear_congruential_engine; template @@ -205,7 +205,7 @@ linear_congruential_engine<_Up, _Ap, _Cp, _Np>& __x); template -class _LIBCPP_TEMPLATE_VIS linear_congruential_engine +class linear_congruential_engine { public: // types diff --git a/libcxx/include/__random/lognormal_distribution.h b/libcxx/include/__random/lognormal_distribution.h --- a/libcxx/include/__random/lognormal_distribution.h +++ b/libcxx/include/__random/lognormal_distribution.h @@ -25,13 +25,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS lognormal_distribution +class lognormal_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class 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 --- a/libcxx/include/__random/mersenne_twister_engine.h +++ b/libcxx/include/__random/mersenne_twister_engine.h @@ -30,7 +30,7 @@ template -class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine; +class mersenne_twister_engine; template -class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine +class mersenne_twister_engine { public: // types diff --git a/libcxx/include/__random/negative_binomial_distribution.h b/libcxx/include/__random/negative_binomial_distribution.h --- a/libcxx/include/__random/negative_binomial_distribution.h +++ b/libcxx/include/__random/negative_binomial_distribution.h @@ -27,14 +27,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS negative_binomial_distribution +class 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 param_type { result_type __k_; double __p_; diff --git a/libcxx/include/__random/normal_distribution.h b/libcxx/include/__random/normal_distribution.h --- a/libcxx/include/__random/normal_distribution.h +++ b/libcxx/include/__random/normal_distribution.h @@ -26,13 +26,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS normal_distribution +class normal_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class 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 --- a/libcxx/include/__random/piecewise_constant_distribution.h +++ b/libcxx/include/__random/piecewise_constant_distribution.h @@ -27,13 +27,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS piecewise_constant_distribution +class piecewise_constant_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class param_type { vector __b_; vector __densities_; diff --git a/libcxx/include/__random/piecewise_linear_distribution.h b/libcxx/include/__random/piecewise_linear_distribution.h --- a/libcxx/include/__random/piecewise_linear_distribution.h +++ b/libcxx/include/__random/piecewise_linear_distribution.h @@ -27,13 +27,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS piecewise_linear_distribution +class piecewise_linear_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class param_type { vector __b_; vector __densities_; diff --git a/libcxx/include/__random/poisson_distribution.h b/libcxx/include/__random/poisson_distribution.h --- a/libcxx/include/__random/poisson_distribution.h +++ b/libcxx/include/__random/poisson_distribution.h @@ -29,14 +29,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS poisson_distribution +class 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 param_type { double __mean_; double __s_; diff --git a/libcxx/include/__random/seed_seq.h b/libcxx/include/__random/seed_seq.h --- a/libcxx/include/__random/seed_seq.h +++ b/libcxx/include/__random/seed_seq.h @@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -class _LIBCPP_TEMPLATE_VIS seed_seq +class seed_seq { public: // types diff --git a/libcxx/include/__random/shuffle_order_engine.h b/libcxx/include/__random/shuffle_order_engine.h --- a/libcxx/include/__random/shuffle_order_engine.h +++ b/libcxx/include/__random/shuffle_order_engine.h @@ -54,7 +54,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS shuffle_order_engine +class 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 --- a/libcxx/include/__random/student_t_distribution.h +++ b/libcxx/include/__random/student_t_distribution.h @@ -27,13 +27,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS student_t_distribution +class student_t_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class 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 --- a/libcxx/include/__random/subtract_with_carry_engine.h +++ b/libcxx/include/__random/subtract_with_carry_engine.h @@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine; +class subtract_with_carry_engine; template _LIBCPP_HIDE_FROM_ABI bool @@ -57,7 +57,7 @@ subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x); template -class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine +class subtract_with_carry_engine { public: // types diff --git a/libcxx/include/__random/uniform_real_distribution.h b/libcxx/include/__random/uniform_real_distribution.h --- a/libcxx/include/__random/uniform_real_distribution.h +++ b/libcxx/include/__random/uniform_real_distribution.h @@ -25,13 +25,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS uniform_real_distribution +class uniform_real_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class param_type { result_type __a_; result_type __b_; diff --git a/libcxx/include/__random/weibull_distribution.h b/libcxx/include/__random/weibull_distribution.h --- a/libcxx/include/__random/weibull_distribution.h +++ b/libcxx/include/__random/weibull_distribution.h @@ -25,13 +25,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS weibull_distribution +class weibull_distribution { public: // types typedef _RealType result_type; - class _LIBCPP_TEMPLATE_VIS param_type + class 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 --- a/libcxx/include/__ranges/non_propagating_cache.h +++ b/libcxx/include/__ranges/non_propagating_cache.h @@ -36,7 +36,7 @@ // may refer to internal details of the source view. template requires is_object_v<_Tp> - class _LIBCPP_TEMPLATE_VIS __non_propagating_cache { + class __non_propagating_cache { struct __from_tag { }; struct __forward_tag { }; diff --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h --- a/libcxx/include/__ranges/subrange.h +++ b/libcxx/include/__ranges/subrange.h @@ -73,8 +73,7 @@ ? subrange_kind::sized : subrange_kind::unsized> requires (_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>) - class _LIBCPP_TEMPLATE_VIS subrange - : public view_interface> + class subrange : public view_interface> { public: // Note: this is an internal implementation detail that is public only for internal usage. diff --git a/libcxx/include/__string/char_traits.h b/libcxx/include/__string/char_traits.h --- a/libcxx/include/__string/char_traits.h +++ b/libcxx/include/__string/char_traits.h @@ -192,7 +192,7 @@ // char_traits template <> -struct _LIBCPP_TEMPLATE_VIS char_traits +struct char_traits { using char_type = char; using int_type = int; @@ -282,7 +282,7 @@ #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> -struct _LIBCPP_TEMPLATE_VIS char_traits +struct char_traits { using char_type = wchar_t; using int_type = wint_t; @@ -353,7 +353,7 @@ #ifndef _LIBCPP_HAS_NO_CHAR8_T template <> -struct _LIBCPP_TEMPLATE_VIS char_traits +struct char_traits { using char_type = char8_t; using int_type = unsigned int; @@ -441,7 +441,7 @@ #endif // _LIBCPP_HAS_NO_CHAR8_T template <> -struct _LIBCPP_TEMPLATE_VIS char_traits +struct char_traits { using char_type = char16_t; using int_type = uint_least16_t; @@ -535,7 +535,7 @@ } template <> -struct _LIBCPP_TEMPLATE_VIS char_traits +struct char_traits { using char_type = char32_t; using int_type = uint_least32_t; diff --git a/libcxx/include/__system_error/error_code.h b/libcxx/include/__system_error/error_code.h --- a/libcxx/include/__system_error/error_code.h +++ b/libcxx/include/__system_error/error_code.h @@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public false_type {}; +struct is_error_code_enum : public false_type {}; #if _LIBCPP_STD_VER >= 17 template @@ -134,7 +134,7 @@ #endif // _LIBCPP_STD_VER <= 17 template <> -struct _LIBCPP_TEMPLATE_VIS hash : public __unary_function { +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(const error_code& __ec) const _NOEXCEPT { return static_cast(__ec.value()); } diff --git a/libcxx/include/__system_error/error_condition.h b/libcxx/include/__system_error/error_condition.h --- 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 -struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum : public false_type {}; +struct is_error_condition_enum : public false_type {}; #if _LIBCPP_STD_VER >= 17 template @@ -33,11 +33,11 @@ #endif template <> -struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum : true_type {}; +struct is_error_condition_enum : true_type {}; #ifdef _LIBCPP_CXX03_LANG template <> -struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum : true_type {}; +struct is_error_condition_enum : true_type {}; #endif namespace __adl_only { @@ -120,7 +120,7 @@ #endif // _LIBCPP_STD_VER <= 17 template <> -struct _LIBCPP_TEMPLATE_VIS hash : public __unary_function { +struct hash : public __unary_function { _LIBCPP_HIDE_FROM_ABI size_t operator()(const error_condition& __ec) const _NOEXCEPT { return static_cast(__ec.value()); } diff --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support --- a/libcxx/include/__threading_support +++ b/libcxx/include/__threading_support @@ -604,7 +604,7 @@ template<> struct hash<__thread_id>; -class _LIBCPP_TEMPLATE_VIS __thread_id +class __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 @@ -647,7 +647,7 @@ friend __thread_id this_thread::get_id() _NOEXCEPT; friend class _LIBCPP_TYPE_VIS thread; - friend struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>; + friend struct hash<__thread_id>; }; inline _LIBCPP_HIDE_FROM_ABI diff --git a/libcxx/include/__tree b/libcxx/include/__tree --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -54,16 +54,26 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template class _LIBCPP_TEMPLATE_VIS map; -template class _LIBCPP_TEMPLATE_VIS multimap; -template class _LIBCPP_TEMPLATE_VIS set; -template class _LIBCPP_TEMPLATE_VIS multiset; +template +class map; + +template +class multimap; + +template +class set; + +template +class multiset; + +template +class __tree; -template class __tree; template - class _LIBCPP_TEMPLATE_VIS __tree_iterator; +class __tree_iterator; + template - class _LIBCPP_TEMPLATE_VIS __tree_const_iterator; +class __tree_const_iterator; template class __tree_end_node; template class __tree_node_base; @@ -73,8 +83,12 @@ struct __value_type; template class __map_node_destructor; -template class _LIBCPP_TEMPLATE_VIS __map_iterator; -template class _LIBCPP_TEMPLATE_VIS __map_const_iterator; + +template +class __map_iterator; + +template +class __map_const_iterator; /* @@ -832,7 +846,7 @@ #endif template -class _LIBCPP_TEMPLATE_VIS __tree_iterator +class __tree_iterator { typedef __tree_node_types<_NodePtr> _NodeTypes; typedef _NodePtr __node_pointer; @@ -896,16 +910,16 @@ _LIBCPP_INLINE_VISIBILITY __node_pointer __get_np() const { return static_cast<__node_pointer>(__ptr_); } template friend class __tree; - template friend class _LIBCPP_TEMPLATE_VIS __tree_const_iterator; - template friend class _LIBCPP_TEMPLATE_VIS __map_iterator; - template friend class _LIBCPP_TEMPLATE_VIS map; - template friend class _LIBCPP_TEMPLATE_VIS multimap; - template friend class _LIBCPP_TEMPLATE_VIS set; - template friend class _LIBCPP_TEMPLATE_VIS multiset; + template friend class __tree_const_iterator; + template friend class __map_iterator; + template friend class map; + template friend class multimap; + template friend class set; + template friend class multiset; }; template -class _LIBCPP_TEMPLATE_VIS __tree_const_iterator +class __tree_const_iterator { typedef __tree_node_types<_NodePtr> _NodeTypes; typedef typename _NodeTypes::__node_pointer __node_pointer; @@ -982,11 +996,11 @@ __node_pointer __get_np() const { return static_cast<__node_pointer>(__ptr_); } template friend class __tree; - template friend class _LIBCPP_TEMPLATE_VIS map; - template friend class _LIBCPP_TEMPLATE_VIS multimap; - template friend class _LIBCPP_TEMPLATE_VIS set; - template friend class _LIBCPP_TEMPLATE_VIS multiset; - template friend class _LIBCPP_TEMPLATE_VIS __map_const_iterator; + template friend class map; + template friend class multimap; + template friend class set; + template friend class multiset; + template friend class __map_const_iterator; }; @@ -1540,8 +1554,8 @@ }; - template friend class _LIBCPP_TEMPLATE_VIS map; - template friend class _LIBCPP_TEMPLATE_VIS multimap; + template friend class map; + template friend class multimap; }; template diff --git a/libcxx/include/__tuple/sfinae_helpers.h b/libcxx/include/__tuple/sfinae_helpers.h --- a/libcxx/include/__tuple/sfinae_helpers.h +++ b/libcxx/include/__tuple/sfinae_helpers.h @@ -103,7 +103,7 @@ template -struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> > +struct tuple_element<_Ip, tuple<_Tp...> > { typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type; }; diff --git a/libcxx/include/__tuple/tuple_element.h b/libcxx/include/__tuple/tuple_element.h --- a/libcxx/include/__tuple/tuple_element.h +++ b/libcxx/include/__tuple/tuple_element.h @@ -23,22 +23,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS tuple_element; +template struct tuple_element; template -struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp> +struct tuple_element<_Ip, const _Tp> { typedef _LIBCPP_NODEBUG typename add_const::type>::type type; }; template -struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp> +struct tuple_element<_Ip, volatile _Tp> { typedef _LIBCPP_NODEBUG typename add_volatile::type>::type type; }; template -struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp> +struct tuple_element<_Ip, const volatile _Tp> { typedef _LIBCPP_NODEBUG typename add_cv::type>::type type; }; @@ -75,7 +75,7 @@ #endif template -struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> > +struct tuple_element<_Ip, __tuple_types<_Types...> > { static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range"); typedef _LIBCPP_NODEBUG __type_pack_element<_Ip, _Types...> type; diff --git a/libcxx/include/__tuple/tuple_size.h b/libcxx/include/__tuple/tuple_size.h --- a/libcxx/include/__tuple/tuple_size.h +++ b/libcxx/include/__tuple/tuple_size.h @@ -22,51 +22,45 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS tuple_size; +template struct tuple_size; #if !defined(_LIBCPP_CXX03_LANG) template using __enable_if_tuple_size_imp = _Tp; template -struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< +struct tuple_size<__enable_if_tuple_size_imp< const _Tp, __enable_if_t::value>, integral_constant)>>> : public integral_constant::value> {}; template -struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< +struct tuple_size<__enable_if_tuple_size_imp< volatile _Tp, __enable_if_t::value>, integral_constant)>>> : public integral_constant::value> {}; template -struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp< +struct tuple_size<__enable_if_tuple_size_imp< const volatile _Tp, integral_constant)>>> : public integral_constant::value> {}; #else -template struct _LIBCPP_TEMPLATE_VIS tuple_size : public tuple_size<_Tp> {}; -template struct _LIBCPP_TEMPLATE_VIS tuple_size : public tuple_size<_Tp> {}; -template struct _LIBCPP_TEMPLATE_VIS tuple_size : public tuple_size<_Tp> {}; +template struct tuple_size : public tuple_size<_Tp> {}; +template struct tuple_size : public tuple_size<_Tp> {}; +template struct tuple_size : public tuple_size<_Tp> {}; #endif #ifndef _LIBCPP_CXX03_LANG template -struct _LIBCPP_TEMPLATE_VIS tuple_size > - : public integral_constant -{ -}; +struct tuple_size > : public integral_constant {}; template -struct _LIBCPP_TEMPLATE_VIS tuple_size<__tuple_types<_Tp...> > - : public integral_constant -{ -}; +struct tuple_size<__tuple_types<_Tp...> > : public integral_constant {}; #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__type_traits/add_const.h b/libcxx/include/__type_traits/add_const.h --- a/libcxx/include/__type_traits/add_const.h +++ b/libcxx/include/__type_traits/add_const.h @@ -17,7 +17,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS add_const { +template +struct add_const { typedef _LIBCPP_NODEBUG const _Tp type; }; diff --git a/libcxx/include/__type_traits/add_cv.h b/libcxx/include/__type_traits/add_cv.h --- a/libcxx/include/__type_traits/add_cv.h +++ b/libcxx/include/__type_traits/add_cv.h @@ -17,7 +17,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS add_cv { +template +struct add_cv { typedef _LIBCPP_NODEBUG const volatile _Tp type; }; diff --git a/libcxx/include/__type_traits/add_volatile.h b/libcxx/include/__type_traits/add_volatile.h --- a/libcxx/include/__type_traits/add_volatile.h +++ b/libcxx/include/__type_traits/add_volatile.h @@ -17,7 +17,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS add_volatile { +template +struct add_volatile { typedef _LIBCPP_NODEBUG volatile _Tp type; }; diff --git a/libcxx/include/__type_traits/aligned_storage.h b/libcxx/include/__type_traits/aligned_storage.h --- a/libcxx/include/__type_traits/aligned_storage.h +++ b/libcxx/include/__type_traits/aligned_storage.h @@ -83,7 +83,7 @@ : public integral_constant::value>::value> {}; template ::value> -struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS aligned_storage +struct _LIBCPP_DEPRECATED_IN_CXX23 aligned_storage { typedef typename __find_pod<__all_types, _Align>::type _Aligner; union type @@ -104,7 +104,7 @@ #define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \ template \ - struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS aligned_storage<_Len, n> { \ + struct _LIBCPP_DEPRECATED_IN_CXX23 aligned_storage<_Len, n> { \ struct _ALIGNAS(n) type { \ unsigned char __lx[(_Len + n - 1) / n * n]; \ }; \ diff --git a/libcxx/include/__type_traits/alignment_of.h b/libcxx/include/__type_traits/alignment_of.h --- a/libcxx/include/__type_traits/alignment_of.h +++ b/libcxx/include/__type_traits/alignment_of.h @@ -19,8 +19,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS alignment_of - : public integral_constant {}; +template +struct alignment_of : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/common_type.h b/libcxx/include/__type_traits/common_type.h --- a/libcxx/include/__type_traits/common_type.h +++ b/libcxx/include/__type_traits/common_type.h @@ -60,7 +60,7 @@ template struct __common_types; template -struct _LIBCPP_TEMPLATE_VIS common_type; +struct common_type; template struct __common_type_impl< @@ -80,19 +80,18 @@ // bullet 1 - sizeof...(Tp) == 0 template <> -struct _LIBCPP_TEMPLATE_VIS common_type<> {}; +struct common_type<> {}; // bullet 2 - sizeof...(Tp) == 1 template -struct _LIBCPP_TEMPLATE_VIS common_type<_Tp> - : public common_type<_Tp, _Tp> {}; +struct common_type<_Tp> : public common_type<_Tp, _Tp> {}; // bullet 3 - sizeof...(Tp) == 2 // sub-bullet 1 - "If is_same_v is false or ..." template -struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up> +struct common_type<_Tp, _Up> : conditional< _IsSame<_Tp, __decay_t<_Tp> >::value && _IsSame<_Up, __decay_t<_Up> >::value, __common_type2_imp<_Tp, _Up>, @@ -103,8 +102,7 @@ // bullet 4 - sizeof...(Tp) > 2 template -struct _LIBCPP_TEMPLATE_VIS - common_type<_Tp, _Up, _Vp, _Rest...> +struct common_type<_Tp, _Up, _Vp, _Rest...> : __common_type_impl< __common_types<_Tp, _Up, _Vp, _Rest...> > {}; diff --git a/libcxx/include/__type_traits/conditional.h b/libcxx/include/__type_traits/conditional.h --- a/libcxx/include/__type_traits/conditional.h +++ b/libcxx/include/__type_traits/conditional.h @@ -36,11 +36,11 @@ using _If _LIBCPP_NODEBUG = typename _IfImpl<_Cond>::template _Select<_IfRes, _ElseRes>; template -struct _LIBCPP_TEMPLATE_VIS conditional { +struct conditional { using type _LIBCPP_NODEBUG = _If; }; template -struct _LIBCPP_TEMPLATE_VIS conditional { +struct conditional { using type _LIBCPP_NODEBUG = _Then; }; diff --git a/libcxx/include/__type_traits/decay.h b/libcxx/include/__type_traits/decay.h --- a/libcxx/include/__type_traits/decay.h +++ b/libcxx/include/__type_traits/decay.h @@ -57,7 +57,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS decay +struct decay { private: typedef _LIBCPP_NODEBUG __libcpp_remove_reference_t<_Tp> _Up; diff --git a/libcxx/include/__type_traits/dependent_type.h b/libcxx/include/__type_traits/dependent_type.h --- 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 -struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {}; +struct __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 --- a/libcxx/include/__type_traits/enable_if.h +++ b/libcxx/include/__type_traits/enable_if.h @@ -17,8 +17,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS enable_if {}; -template struct _LIBCPP_TEMPLATE_VIS enable_if {typedef _Tp type;}; +template +struct enable_if {}; + +template +struct enable_if {typedef _Tp type;}; template using __enable_if_t _LIBCPP_NODEBUG = typename enable_if<_Bp, _Tp>::type; diff --git a/libcxx/include/__type_traits/extent.h b/libcxx/include/__type_traits/extent.h --- a/libcxx/include/__type_traits/extent.h +++ b/libcxx/include/__type_traits/extent.h @@ -22,8 +22,7 @@ #if __has_builtin(__array_extent) template -struct _LIBCPP_TEMPLATE_VIS extent - : integral_constant { }; +struct extent : integral_constant { }; #if _LIBCPP_STD_VER >= 17 template @@ -32,16 +31,16 @@ #else // __has_builtin(__array_extent) -template struct _LIBCPP_TEMPLATE_VIS extent - : public integral_constant {}; -template struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], 0> - : public integral_constant {}; -template struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], _Ip> - : public integral_constant::value> {}; -template struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], 0> - : public integral_constant {}; -template struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], _Ip> - : public integral_constant::value> {}; +template +struct extent : public integral_constant {}; +template +struct extent<_Tp[], 0> : public integral_constant {}; +template +struct extent<_Tp[], _Ip> : public integral_constant::value> {}; +template +struct extent<_Tp[_Np], 0> : public integral_constant {}; +template +struct extent<_Tp[_Np], _Ip> : public integral_constant::value> {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/has_unique_object_representation.h b/libcxx/include/__type_traits/has_unique_object_representation.h --- a/libcxx/include/__type_traits/has_unique_object_representation.h +++ b/libcxx/include/__type_traits/has_unique_object_representation.h @@ -22,7 +22,7 @@ #if _LIBCPP_STD_VER >= 17 -template struct _LIBCPP_TEMPLATE_VIS has_unique_object_representations +template struct has_unique_object_representations : public integral_constant>)> {}; diff --git a/libcxx/include/__type_traits/has_virtual_destructor.h b/libcxx/include/__type_traits/has_virtual_destructor.h --- a/libcxx/include/__type_traits/has_virtual_destructor.h +++ b/libcxx/include/__type_traits/has_virtual_destructor.h @@ -18,8 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor - : public integral_constant {}; +template +struct has_virtual_destructor : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/integral_constant.h b/libcxx/include/__type_traits/integral_constant.h --- 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 -struct _LIBCPP_TEMPLATE_VIS integral_constant +struct integral_constant { static _LIBCPP_CONSTEXPR const _Tp value = __v; typedef _Tp value_type; diff --git a/libcxx/include/__type_traits/invoke.h b/libcxx/include/__type_traits/invoke.h --- a/libcxx/include/__type_traits/invoke.h +++ b/libcxx/include/__type_traits/invoke.h @@ -491,12 +491,10 @@ // is_invocable template -struct _LIBCPP_TEMPLATE_VIS is_invocable - : integral_constant::value> {}; +struct is_invocable : integral_constant::value> {}; template -struct _LIBCPP_TEMPLATE_VIS is_invocable_r - : integral_constant::value> {}; +struct is_invocable_r : integral_constant::value> {}; template inline constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; @@ -507,12 +505,10 @@ // is_nothrow_invocable template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable - : integral_constant::value> {}; +struct is_nothrow_invocable : integral_constant::value> {}; template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable_r - : integral_constant::value> {}; +struct is_nothrow_invocable_r : integral_constant::value> {}; template inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value; @@ -521,10 +517,7 @@ inline constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; template -struct _LIBCPP_TEMPLATE_VIS invoke_result - : __invoke_of<_Fn, _Args...> -{ -}; +struct invoke_result : __invoke_of<_Fn, _Args...> {}; template 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 --- a/libcxx/include/__type_traits/is_abstract.h +++ b/libcxx/include/__type_traits/is_abstract.h @@ -18,8 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_abstract - : public integral_constant {}; +template +struct is_abstract : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_aggregate.h b/libcxx/include/__type_traits/is_aggregate.h --- a/libcxx/include/__type_traits/is_aggregate.h +++ b/libcxx/include/__type_traits/is_aggregate.h @@ -20,8 +20,8 @@ #if _LIBCPP_STD_VER >= 17 -template struct _LIBCPP_TEMPLATE_VIS -is_aggregate : public integral_constant {}; +template +struct is_aggregate : public integral_constant {}; template inline constexpr bool is_aggregate_v = __is_aggregate(_Tp); diff --git a/libcxx/include/__type_traits/is_arithmetic.h b/libcxx/include/__type_traits/is_arithmetic.h --- a/libcxx/include/__type_traits/is_arithmetic.h +++ b/libcxx/include/__type_traits/is_arithmetic.h @@ -20,9 +20,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_arithmetic - : public integral_constant::value || - is_floating_point<_Tp>::value> {}; +template +struct is_arithmetic : public integral_constant::value || is_floating_point<_Tp>::value> {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_array.h b/libcxx/include/__type_traits/is_array.h --- a/libcxx/include/__type_traits/is_array.h +++ b/libcxx/include/__type_traits/is_array.h @@ -24,7 +24,7 @@ #if __has_builtin(__is_array) && 0 template -struct _LIBCPP_TEMPLATE_VIS is_array : _BoolConstant<__is_array(_Tp)> { }; +struct is_array : _BoolConstant<__is_array(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -33,12 +33,12 @@ #else -template struct _LIBCPP_TEMPLATE_VIS is_array - : public false_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[]> - : public true_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[_Np]> - : public true_type {}; +template +struct is_array : public false_type {}; +template +struct is_array<_Tp[]> : public true_type {}; +template +struct is_array<_Tp[_Np]> : public true_type {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_assignable.h b/libcxx/include/__type_traits/is_assignable.h --- a/libcxx/include/__type_traits/is_assignable.h +++ b/libcxx/include/__type_traits/is_assignable.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_assignable : _BoolConstant<__is_assignable(_Tp, _Up)> { }; +struct is_assignable : _BoolConstant<__is_assignable(_Tp, _Up)> { }; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_base_of.h b/libcxx/include/__type_traits/is_base_of.h --- a/libcxx/include/__type_traits/is_base_of.h +++ b/libcxx/include/__type_traits/is_base_of.h @@ -19,8 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_base_of - : public integral_constant {}; +struct is_base_of : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_bounded_array.h b/libcxx/include/__type_traits/is_bounded_array.h --- a/libcxx/include/__type_traits/is_bounded_array.h +++ b/libcxx/include/__type_traits/is_bounded_array.h @@ -19,13 +19,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS __libcpp_is_bounded_array : false_type {}; -template struct _LIBCPP_TEMPLATE_VIS __libcpp_is_bounded_array<_Tp[_Np]> : true_type {}; +template struct __libcpp_is_bounded_array : false_type {}; +template struct __libcpp_is_bounded_array<_Tp[_Np]> : true_type {}; #if _LIBCPP_STD_VER >= 20 -template struct _LIBCPP_TEMPLATE_VIS is_bounded_array : false_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_bounded_array<_Tp[_Np]> : true_type {}; +template struct is_bounded_array : false_type {}; +template struct is_bounded_array<_Tp[_Np]> : true_type {}; template inline constexpr diff --git a/libcxx/include/__type_traits/is_class.h b/libcxx/include/__type_traits/is_class.h --- a/libcxx/include/__type_traits/is_class.h +++ b/libcxx/include/__type_traits/is_class.h @@ -18,8 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_class - : public integral_constant {}; +template +struct is_class : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_compound.h b/libcxx/include/__type_traits/is_compound.h --- a/libcxx/include/__type_traits/is_compound.h +++ b/libcxx/include/__type_traits/is_compound.h @@ -22,7 +22,7 @@ #if __has_builtin(__is_compound) template -struct _LIBCPP_TEMPLATE_VIS is_compound : _BoolConstant<__is_compound(_Tp)> { }; +struct is_compound : _BoolConstant<__is_compound(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -31,8 +31,8 @@ #else // __has_builtin(__is_compound) -template struct _LIBCPP_TEMPLATE_VIS is_compound - : public integral_constant::value> {}; +template +struct is_compound : public integral_constant::value> {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_const.h b/libcxx/include/__type_traits/is_const.h --- a/libcxx/include/__type_traits/is_const.h +++ b/libcxx/include/__type_traits/is_const.h @@ -21,7 +21,7 @@ #if __has_builtin(__is_const) template -struct _LIBCPP_TEMPLATE_VIS is_const : _BoolConstant<__is_const(_Tp)> { }; +struct is_const : _BoolConstant<__is_const(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -30,8 +30,8 @@ #else -template struct _LIBCPP_TEMPLATE_VIS is_const : public false_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_const<_Tp const> : public true_type {}; +template struct is_const : public false_type {}; +template struct is_const<_Tp const> : public true_type {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_constructible.h b/libcxx/include/__type_traits/is_constructible.h --- a/libcxx/include/__type_traits/is_constructible.h +++ b/libcxx/include/__type_traits/is_constructible.h @@ -19,9 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_constructible - : public integral_constant -{ }; +struct is_constructible : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_convertible.h b/libcxx/include/__type_traits/is_convertible.h --- a/libcxx/include/__type_traits/is_convertible.h +++ b/libcxx/include/__type_traits/is_convertible.h @@ -27,12 +27,12 @@ #if __has_builtin(__is_convertible) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) template -struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant {}; +struct is_convertible : public integral_constant {}; #elif __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) -template struct _LIBCPP_TEMPLATE_VIS is_convertible - : public integral_constant {}; +template +struct is_convertible : public integral_constant {}; // TODO: Remove this fallback when GCC < 13 support is no longer required. // GCC 13 has the __is_convertible built-in. @@ -96,8 +96,8 @@ template struct __is_convertible<_T1, _T2, 2, 3> : public false_type {}; template struct __is_convertible<_T1, _T2, 3, 3> : public true_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_convertible - : public __is_convertible<_T1, _T2> +template +struct is_convertible : public __is_convertible<_T1, _T2> { static const size_t __complete_check1 = __is_convertible_check<_T1>::__v; static const size_t __complete_check2 = __is_convertible_check<_T2>::__v; diff --git a/libcxx/include/__type_traits/is_copy_assignable.h b/libcxx/include/__type_traits/is_copy_assignable.h --- a/libcxx/include/__type_traits/is_copy_assignable.h +++ b/libcxx/include/__type_traits/is_copy_assignable.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_copy_assignable +struct is_copy_assignable : public integral_constant< bool, __is_assignable(__add_lvalue_reference_t<_Tp>, diff --git a/libcxx/include/__type_traits/is_copy_constructible.h b/libcxx/include/__type_traits/is_copy_constructible.h --- a/libcxx/include/__type_traits/is_copy_constructible.h +++ b/libcxx/include/__type_traits/is_copy_constructible.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_copy_constructible +struct is_copy_constructible : public integral_constant< bool, __is_constructible(_Tp, __add_lvalue_reference_t::type>)> {}; diff --git a/libcxx/include/__type_traits/is_default_constructible.h b/libcxx/include/__type_traits/is_default_constructible.h --- a/libcxx/include/__type_traits/is_default_constructible.h +++ b/libcxx/include/__type_traits/is_default_constructible.h @@ -19,9 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_default_constructible - : public integral_constant - {}; +struct is_default_constructible : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_destructible.h b/libcxx/include/__type_traits/is_destructible.h --- a/libcxx/include/__type_traits/is_destructible.h +++ b/libcxx/include/__type_traits/is_destructible.h @@ -25,7 +25,7 @@ #if __has_builtin(__is_destructible) template -struct _LIBCPP_TEMPLATE_VIS is_destructible : _BoolConstant<__is_destructible(_Tp)> { }; +struct is_destructible : _BoolConstant<__is_destructible(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_empty.h b/libcxx/include/__type_traits/is_empty.h --- a/libcxx/include/__type_traits/is_empty.h +++ b/libcxx/include/__type_traits/is_empty.h @@ -19,8 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_empty - : public integral_constant {}; +struct is_empty : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_enum.h b/libcxx/include/__type_traits/is_enum.h --- a/libcxx/include/__type_traits/is_enum.h +++ b/libcxx/include/__type_traits/is_enum.h @@ -18,8 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_enum - : public integral_constant {}; +template +struct is_enum : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_final.h b/libcxx/include/__type_traits/is_final.h --- a/libcxx/include/__type_traits/is_final.h +++ b/libcxx/include/__type_traits/is_final.h @@ -18,12 +18,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS -__libcpp_is_final : public integral_constant {}; +template +struct __libcpp_is_final : public integral_constant {}; #if _LIBCPP_STD_VER >= 14 -template struct _LIBCPP_TEMPLATE_VIS -is_final : public integral_constant {}; +template +struct is_final : public integral_constant {}; #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 --- a/libcxx/include/__type_traits/is_floating_point.h +++ b/libcxx/include/__type_traits/is_floating_point.h @@ -24,8 +24,8 @@ template <> struct __libcpp_is_floating_point : public true_type {}; template <> struct __libcpp_is_floating_point : public true_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_floating_point - : public __libcpp_is_floating_point<__remove_cv_t<_Tp> > {}; +template +struct is_floating_point : public __libcpp_is_floating_point<__remove_cv_t<_Tp> > {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_function.h b/libcxx/include/__type_traits/is_function.h --- a/libcxx/include/__type_traits/is_function.h +++ b/libcxx/include/__type_traits/is_function.h @@ -23,13 +23,12 @@ #if __has_builtin(__is_function) template -struct _LIBCPP_TEMPLATE_VIS is_function : integral_constant {}; +struct is_function : integral_constant {}; #else template -struct _LIBCPP_TEMPLATE_VIS is_function - : public integral_constant::value || is_const::value)> {}; +struct is_function : public integral_constant::value || is_const::value)> {}; #endif // __has_builtin(__is_function) diff --git a/libcxx/include/__type_traits/is_fundamental.h b/libcxx/include/__type_traits/is_fundamental.h --- a/libcxx/include/__type_traits/is_fundamental.h +++ b/libcxx/include/__type_traits/is_fundamental.h @@ -23,7 +23,7 @@ #if __has_builtin(__is_fundamental) template -struct _LIBCPP_TEMPLATE_VIS is_fundamental : _BoolConstant<__is_fundamental(_Tp)> { }; +struct is_fundamental : _BoolConstant<__is_fundamental(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -32,7 +32,7 @@ #else // __has_builtin(__is_fundamental) -template struct _LIBCPP_TEMPLATE_VIS is_fundamental +template struct is_fundamental : public integral_constant::value || __is_nullptr_t<_Tp>::value || is_arithmetic<_Tp>::value> {}; diff --git a/libcxx/include/__type_traits/is_integral.h b/libcxx/include/__type_traits/is_integral.h --- a/libcxx/include/__type_traits/is_integral.h +++ b/libcxx/include/__type_traits/is_integral.h @@ -48,7 +48,7 @@ #if __has_builtin(__is_integral) template -struct _LIBCPP_TEMPLATE_VIS is_integral : _BoolConstant<__is_integral(_Tp)> { }; +struct is_integral : _BoolConstant<__is_integral(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -57,8 +57,8 @@ #else -template struct _LIBCPP_TEMPLATE_VIS is_integral - : public _BoolConstant<__libcpp_is_integral<__remove_cv_t<_Tp> >::value> {}; +template +struct is_integral : public _BoolConstant<__libcpp_is_integral<__remove_cv_t<_Tp> >::value> {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_literal_type.h b/libcxx/include/__type_traits/is_literal_type.h --- a/libcxx/include/__type_traits/is_literal_type.h +++ b/libcxx/include/__type_traits/is_literal_type.h @@ -19,9 +19,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS) -template struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 is_literal_type - : public integral_constant - {}; +template +struct _LIBCPP_DEPRECATED_IN_CXX17 is_literal_type : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_member_function_pointer.h b/libcxx/include/__type_traits/is_member_function_pointer.h --- a/libcxx/include/__type_traits/is_member_function_pointer.h +++ b/libcxx/include/__type_traits/is_member_function_pointer.h @@ -39,8 +39,7 @@ #if __has_builtin(__is_member_function_pointer) template -struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer - : _BoolConstant<__is_member_function_pointer(_Tp)> { }; +struct is_member_function_pointer : _BoolConstant<__is_member_function_pointer(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -49,8 +48,9 @@ #else // __has_builtin(__is_member_function_pointer) -template struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer - : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_func > {}; +template +struct is_member_function_pointer : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_func > { +}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_member_object_pointer.h b/libcxx/include/__type_traits/is_member_object_pointer.h --- a/libcxx/include/__type_traits/is_member_object_pointer.h +++ b/libcxx/include/__type_traits/is_member_object_pointer.h @@ -21,8 +21,7 @@ #if __has_builtin(__is_member_object_pointer) template -struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer - : _BoolConstant<__is_member_object_pointer(_Tp)> { }; +struct is_member_object_pointer : _BoolConstant<__is_member_object_pointer(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -31,8 +30,8 @@ #else // __has_builtin(__is_member_object_pointer) -template struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer - : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_obj > {}; +template +struct is_member_object_pointer : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_obj > {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_member_pointer.h b/libcxx/include/__type_traits/is_member_pointer.h --- a/libcxx/include/__type_traits/is_member_pointer.h +++ b/libcxx/include/__type_traits/is_member_pointer.h @@ -22,7 +22,7 @@ #if __has_builtin(__is_member_pointer) template -struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> { }; +struct is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -31,8 +31,8 @@ #else // __has_builtin(__is_member_pointer) -template struct _LIBCPP_TEMPLATE_VIS is_member_pointer - : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_member > {}; +template +struct is_member_pointer : public _BoolConstant< __libcpp_is_member_pointer<__remove_cv_t<_Tp> >::__is_member > {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_move_assignable.h b/libcxx/include/__type_traits/is_move_assignable.h --- a/libcxx/include/__type_traits/is_move_assignable.h +++ b/libcxx/include/__type_traits/is_move_assignable.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_move_assignable +struct is_move_assignable : public integral_constant< bool, __is_assignable(__add_lvalue_reference_t<_Tp>, __add_rvalue_reference_t<_Tp>)> {}; diff --git a/libcxx/include/__type_traits/is_move_constructible.h b/libcxx/include/__type_traits/is_move_constructible.h --- a/libcxx/include/__type_traits/is_move_constructible.h +++ b/libcxx/include/__type_traits/is_move_constructible.h @@ -20,9 +20,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_move_constructible - : public integral_constant)> - {}; +struct is_move_constructible : public integral_constant)> { +}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_nothrow_assignable.h b/libcxx/include/__type_traits/is_nothrow_assignable.h --- a/libcxx/include/__type_traits/is_nothrow_assignable.h +++ b/libcxx/include/__type_traits/is_nothrow_assignable.h @@ -19,8 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable - : public integral_constant {}; +struct is_nothrow_assignable : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_nothrow_constructible.h b/libcxx/include/__type_traits/is_nothrow_constructible.h --- a/libcxx/include/__type_traits/is_nothrow_constructible.h +++ b/libcxx/include/__type_traits/is_nothrow_constructible.h @@ -26,8 +26,7 @@ template < class _Tp, class... _Args> -struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible - : public integral_constant {}; +struct is_nothrow_constructible : public integral_constant {}; #else template struct __libcpp_is_nothrow_constructible; @@ -54,13 +53,13 @@ }; template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible +struct is_nothrow_constructible : __libcpp_is_nothrow_constructible::value, is_reference<_Tp>::value, _Tp, _Args...> { }; template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp[_Ns]> +struct is_nothrow_constructible<_Tp[_Ns]> : __libcpp_is_nothrow_constructible::value, is_reference<_Tp>::value, _Tp> { }; diff --git a/libcxx/include/__type_traits/is_nothrow_copy_assignable.h b/libcxx/include/__type_traits/is_nothrow_copy_assignable.h --- a/libcxx/include/__type_traits/is_nothrow_copy_assignable.h +++ b/libcxx/include/__type_traits/is_nothrow_copy_assignable.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_assignable +struct is_nothrow_copy_assignable : public integral_constant< bool, __is_nothrow_assignable( diff --git a/libcxx/include/__type_traits/is_nothrow_copy_constructible.h b/libcxx/include/__type_traits/is_nothrow_copy_constructible.h --- a/libcxx/include/__type_traits/is_nothrow_copy_constructible.h +++ b/libcxx/include/__type_traits/is_nothrow_copy_constructible.h @@ -24,14 +24,14 @@ // TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed #ifdef _LIBCPP_COMPILER_GCC -template struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible - : public is_nothrow_constructible<_Tp, - __add_lvalue_reference_t::type> > {}; +template +struct is_nothrow_copy_constructible + : public is_nothrow_constructible<_Tp, __add_lvalue_reference_t::type> > {}; #else // _LIBCPP_COMPILER_GCC template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible +struct is_nothrow_copy_constructible : public integral_constant< bool, __is_nothrow_constructible(_Tp, typename add_lvalue_reference::type>::type)> {}; diff --git a/libcxx/include/__type_traits/is_nothrow_default_constructible.h b/libcxx/include/__type_traits/is_nothrow_default_constructible.h --- a/libcxx/include/__type_traits/is_nothrow_default_constructible.h +++ b/libcxx/include/__type_traits/is_nothrow_default_constructible.h @@ -18,9 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_nothrow_default_constructible - : public integral_constant - {}; +template +struct is_nothrow_default_constructible : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_nothrow_destructible.h b/libcxx/include/__type_traits/is_nothrow_destructible.h --- a/libcxx/include/__type_traits/is_nothrow_destructible.h +++ b/libcxx/include/__type_traits/is_nothrow_destructible.h @@ -41,28 +41,16 @@ }; template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible - : public __libcpp_is_nothrow_destructible::value, _Tp> -{ -}; +struct is_nothrow_destructible : public __libcpp_is_nothrow_destructible::value, _Tp> {}; template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[_Ns]> - : public is_nothrow_destructible<_Tp> -{ -}; +struct is_nothrow_destructible<_Tp[_Ns]> : public is_nothrow_destructible<_Tp> {}; template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&> - : public true_type -{ -}; +struct is_nothrow_destructible<_Tp&> : public true_type {}; template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&&> - : public true_type -{ -}; +struct is_nothrow_destructible<_Tp&&> : public true_type {}; #else @@ -70,12 +58,11 @@ : public integral_constant::value || is_reference<_Tp>::value> {}; -template struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible - : public __libcpp_nothrow_destructor<__remove_all_extents_t<_Tp> > {}; +template +struct is_nothrow_destructible : public __libcpp_nothrow_destructor<__remove_all_extents_t<_Tp> > {}; template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[]> - : public false_type {}; +struct is_nothrow_destructible<_Tp[]> : public false_type {}; #endif diff --git a/libcxx/include/__type_traits/is_nothrow_move_assignable.h b/libcxx/include/__type_traits/is_nothrow_move_assignable.h --- a/libcxx/include/__type_traits/is_nothrow_move_assignable.h +++ b/libcxx/include/__type_traits/is_nothrow_move_assignable.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable +struct 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_move_constructible.h b/libcxx/include/__type_traits/is_nothrow_move_constructible.h --- a/libcxx/include/__type_traits/is_nothrow_move_constructible.h +++ b/libcxx/include/__type_traits/is_nothrow_move_constructible.h @@ -23,15 +23,14 @@ // TODO: remove this implementation once https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611 is fixed #ifndef _LIBCPP_COMPILER_GCC -template struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible +template struct is_nothrow_move_constructible : public integral_constant)> {}; #else // _LIBCPP_COMPILER_GCC -template struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible - : public is_nothrow_constructible<_Tp, __add_rvalue_reference_t<_Tp> > - {}; +template +struct is_nothrow_move_constructible : public is_nothrow_constructible<_Tp, __add_rvalue_reference_t<_Tp> > {}; #endif // _LIBCPP_COMPILER_GCC diff --git a/libcxx/include/__type_traits/is_null_pointer.h b/libcxx/include/__type_traits/is_null_pointer.h --- a/libcxx/include/__type_traits/is_null_pointer.h +++ b/libcxx/include/__type_traits/is_null_pointer.h @@ -23,12 +23,12 @@ template struct __is_nullptr_t_impl : public false_type {}; template <> struct __is_nullptr_t_impl : public true_type {}; -template struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t - : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; +template +struct __is_nullptr_t : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; #if _LIBCPP_STD_VER >= 14 -template struct _LIBCPP_TEMPLATE_VIS is_null_pointer - : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; +template +struct is_null_pointer : public __is_nullptr_t_impl<__remove_cv_t<_Tp> > {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_object.h b/libcxx/include/__type_traits/is_object.h --- a/libcxx/include/__type_traits/is_object.h +++ b/libcxx/include/__type_traits/is_object.h @@ -25,7 +25,7 @@ #if __has_builtin(__is_object) template -struct _LIBCPP_TEMPLATE_VIS is_object : _BoolConstant<__is_object(_Tp)> { }; +struct is_object : _BoolConstant<__is_object(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -34,7 +34,7 @@ #else // __has_builtin(__is_object) -template struct _LIBCPP_TEMPLATE_VIS is_object +template struct is_object : public integral_constant::value || is_array<_Tp>::value || is_union<_Tp>::value || diff --git a/libcxx/include/__type_traits/is_pod.h b/libcxx/include/__type_traits/is_pod.h --- a/libcxx/include/__type_traits/is_pod.h +++ b/libcxx/include/__type_traits/is_pod.h @@ -18,8 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_pod - : public integral_constant {}; +template +struct is_pod : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_pointer.h b/libcxx/include/__type_traits/is_pointer.h --- a/libcxx/include/__type_traits/is_pointer.h +++ b/libcxx/include/__type_traits/is_pointer.h @@ -22,7 +22,7 @@ #if __has_builtin(__is_pointer) template -struct _LIBCPP_TEMPLATE_VIS is_pointer : _BoolConstant<__is_pointer(_Tp)> { }; +struct is_pointer : _BoolConstant<__is_pointer(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -42,8 +42,8 @@ template struct __libcpp_remove_objc_qualifiers<_Tp __unsafe_unretained> { typedef _Tp type; }; #endif -template struct _LIBCPP_TEMPLATE_VIS is_pointer - : public __libcpp_is_pointer >::type> {}; +template +struct is_pointer : public __libcpp_is_pointer >::type> {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_polymorphic.h b/libcxx/include/__type_traits/is_polymorphic.h --- a/libcxx/include/__type_traits/is_polymorphic.h +++ b/libcxx/include/__type_traits/is_polymorphic.h @@ -19,8 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_polymorphic - : public integral_constant {}; +struct is_polymorphic : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_reference.h b/libcxx/include/__type_traits/is_reference.h --- a/libcxx/include/__type_traits/is_reference.h +++ b/libcxx/include/__type_traits/is_reference.h @@ -23,13 +23,13 @@ __has_builtin(__is_reference) template -struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { }; +struct is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { }; template -struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : _BoolConstant<__is_rvalue_reference(_Tp)> { }; +struct is_rvalue_reference : _BoolConstant<__is_rvalue_reference(_Tp)> { }; template -struct _LIBCPP_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> { }; +struct is_reference : _BoolConstant<__is_reference(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -42,15 +42,15 @@ #else // __has_builtin(__is_lvalue_reference) && etc... -template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : public false_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference<_Tp&> : public true_type {}; +template struct is_lvalue_reference : public false_type {}; +template struct is_lvalue_reference<_Tp&> : public true_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : public false_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {}; +template struct is_rvalue_reference : public false_type {}; +template struct is_rvalue_reference<_Tp&&> : public true_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_reference : public false_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&> : public true_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public true_type {}; +template struct is_reference : public false_type {}; +template struct is_reference<_Tp&> : public true_type {}; +template struct is_reference<_Tp&&> : public true_type {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_reference_wrapper.h b/libcxx/include/__type_traits/is_reference_wrapper.h --- a/libcxx/include/__type_traits/is_reference_wrapper.h +++ b/libcxx/include/__type_traits/is_reference_wrapper.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template class _LIBCPP_TEMPLATE_VIS reference_wrapper; +template class reference_wrapper; template struct __is_reference_wrapper_impl : public false_type {}; template struct __is_reference_wrapper_impl > : public true_type {}; diff --git a/libcxx/include/__type_traits/is_same.h b/libcxx/include/__type_traits/is_same.h --- 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 -struct _LIBCPP_TEMPLATE_VIS is_same : _BoolConstant<__is_same(_Tp, _Up)> { }; +struct is_same : _BoolConstant<__is_same(_Tp, _Up)> { }; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_scalar.h b/libcxx/include/__type_traits/is_scalar.h --- a/libcxx/include/__type_traits/is_scalar.h +++ b/libcxx/include/__type_traits/is_scalar.h @@ -26,7 +26,7 @@ #if __has_builtin(__is_scalar) template -struct _LIBCPP_TEMPLATE_VIS is_scalar : _BoolConstant<__is_scalar(_Tp)> { }; +struct is_scalar : _BoolConstant<__is_scalar(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -40,7 +40,7 @@ template struct __is_block<_Rp (^)(_Args...)> : true_type {}; #endif -template struct _LIBCPP_TEMPLATE_VIS is_scalar +template struct is_scalar : public integral_constant::value || is_member_pointer<_Tp>::value || is_pointer<_Tp>::value || @@ -48,7 +48,8 @@ __is_block<_Tp>::value || is_enum<_Tp>::value > {}; -template <> struct _LIBCPP_TEMPLATE_VIS is_scalar : public true_type {}; +template <> +struct is_scalar : public true_type {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_scoped_enum.h b/libcxx/include/__type_traits/is_scoped_enum.h --- a/libcxx/include/__type_traits/is_scoped_enum.h +++ b/libcxx/include/__type_traits/is_scoped_enum.h @@ -30,8 +30,7 @@ : public bool_constant > > {}; template -struct _LIBCPP_TEMPLATE_VIS is_scoped_enum - : public __is_scoped_enum_helper<_Tp> {}; +struct is_scoped_enum : public __is_scoped_enum_helper<_Tp> {}; template inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value; diff --git a/libcxx/include/__type_traits/is_signed.h b/libcxx/include/__type_traits/is_signed.h --- a/libcxx/include/__type_traits/is_signed.h +++ b/libcxx/include/__type_traits/is_signed.h @@ -23,7 +23,7 @@ #if __has_builtin(__is_signed) template -struct _LIBCPP_TEMPLATE_VIS is_signed : _BoolConstant<__is_signed(_Tp)> { }; +struct is_signed : _BoolConstant<__is_signed(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -43,7 +43,8 @@ template struct __libcpp_is_signed<_Tp, false> : public false_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_signed : public __libcpp_is_signed<_Tp> {}; +template +struct is_signed : public __libcpp_is_signed<_Tp> {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_standard_layout.h b/libcxx/include/__type_traits/is_standard_layout.h --- a/libcxx/include/__type_traits/is_standard_layout.h +++ b/libcxx/include/__type_traits/is_standard_layout.h @@ -18,9 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_standard_layout - : public integral_constant - {}; +template +struct is_standard_layout : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_swappable.h b/libcxx/include/__type_traits/is_swappable.h --- a/libcxx/include/__type_traits/is_swappable.h +++ b/libcxx/include/__type_traits/is_swappable.h @@ -111,13 +111,10 @@ #if _LIBCPP_STD_VER >= 17 template -struct _LIBCPP_TEMPLATE_VIS is_swappable_with - : public integral_constant::value> -{ -}; +struct is_swappable_with : public integral_constant::value> {}; template -struct _LIBCPP_TEMPLATE_VIS is_swappable +struct is_swappable : public __conditional_t< __libcpp_is_referenceable<_Tp>::value, is_swappable_with< @@ -129,13 +126,11 @@ }; template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable_with - : public integral_constant::value> -{ +struct is_nothrow_swappable_with : public integral_constant::value> { }; template -struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable +struct is_nothrow_swappable : public __conditional_t< __libcpp_is_referenceable<_Tp>::value, is_nothrow_swappable_with< diff --git a/libcxx/include/__type_traits/is_trivial.h b/libcxx/include/__type_traits/is_trivial.h --- a/libcxx/include/__type_traits/is_trivial.h +++ b/libcxx/include/__type_traits/is_trivial.h @@ -18,9 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_trivial - : public integral_constant - {}; +template +struct is_trivial : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_trivially_constructible.h b/libcxx/include/__type_traits/is_trivially_constructible.h --- a/libcxx/include/__type_traits/is_trivially_constructible.h +++ b/libcxx/include/__type_traits/is_trivially_constructible.h @@ -19,10 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible - : integral_constant -{ -}; +struct is_trivially_constructible : integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_trivially_copy_assignable.h b/libcxx/include/__type_traits/is_trivially_copy_assignable.h --- a/libcxx/include/__type_traits/is_trivially_copy_assignable.h +++ b/libcxx/include/__type_traits/is_trivially_copy_assignable.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_assignable +struct is_trivially_copy_assignable : public integral_constant< bool, __is_trivially_assignable( diff --git a/libcxx/include/__type_traits/is_trivially_copy_constructible.h b/libcxx/include/__type_traits/is_trivially_copy_constructible.h --- a/libcxx/include/__type_traits/is_trivially_copy_constructible.h +++ b/libcxx/include/__type_traits/is_trivially_copy_constructible.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_constructible +template struct is_trivially_copy_constructible : public integral_constant)> {}; diff --git a/libcxx/include/__type_traits/is_trivially_copyable.h b/libcxx/include/__type_traits/is_trivially_copyable.h --- a/libcxx/include/__type_traits/is_trivially_copyable.h +++ b/libcxx/include/__type_traits/is_trivially_copyable.h @@ -19,7 +19,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_trivially_copyable +template struct is_trivially_copyable : public integral_constant {}; diff --git a/libcxx/include/__type_traits/is_trivially_default_constructible.h b/libcxx/include/__type_traits/is_trivially_default_constructible.h --- a/libcxx/include/__type_traits/is_trivially_default_constructible.h +++ b/libcxx/include/__type_traits/is_trivially_default_constructible.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_trivially_default_constructible +template struct is_trivially_default_constructible : public integral_constant {}; diff --git a/libcxx/include/__type_traits/is_trivially_destructible.h b/libcxx/include/__type_traits/is_trivially_destructible.h --- a/libcxx/include/__type_traits/is_trivially_destructible.h +++ b/libcxx/include/__type_traits/is_trivially_destructible.h @@ -21,12 +21,12 @@ #if __has_builtin(__is_trivially_destructible) -template struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible - : public integral_constant {}; +template +struct is_trivially_destructible : public integral_constant {}; #elif __has_builtin(__has_trivial_destructor) -template struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible +template struct is_trivially_destructible : public integral_constant::value && __has_trivial_destructor(_Tp)> {}; #else diff --git a/libcxx/include/__type_traits/is_trivially_move_assignable.h b/libcxx/include/__type_traits/is_trivially_move_assignable.h --- a/libcxx/include/__type_traits/is_trivially_move_assignable.h +++ b/libcxx/include/__type_traits/is_trivially_move_assignable.h @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_trivially_move_assignable +struct 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_move_constructible.h b/libcxx/include/__type_traits/is_trivially_move_constructible.h --- a/libcxx/include/__type_traits/is_trivially_move_constructible.h +++ b/libcxx/include/__type_traits/is_trivially_move_constructible.h @@ -20,7 +20,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS is_trivially_move_constructible +struct is_trivially_move_constructible : public integral_constant)> {}; #if _LIBCPP_STD_VER >= 17 diff --git a/libcxx/include/__type_traits/is_unbounded_array.h b/libcxx/include/__type_traits/is_unbounded_array.h --- a/libcxx/include/__type_traits/is_unbounded_array.h +++ b/libcxx/include/__type_traits/is_unbounded_array.h @@ -18,13 +18,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS __libcpp_is_unbounded_array : false_type {}; -template struct _LIBCPP_TEMPLATE_VIS __libcpp_is_unbounded_array<_Tp[]> : true_type {}; +template struct __libcpp_is_unbounded_array : false_type {}; +template struct __libcpp_is_unbounded_array<_Tp[]> : true_type {}; #if _LIBCPP_STD_VER >= 20 -template struct _LIBCPP_TEMPLATE_VIS is_unbounded_array : false_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_unbounded_array<_Tp[]> : true_type {}; +template struct is_unbounded_array : false_type {}; +template struct is_unbounded_array<_Tp[]> : true_type {}; template inline constexpr diff --git a/libcxx/include/__type_traits/is_union.h b/libcxx/include/__type_traits/is_union.h --- a/libcxx/include/__type_traits/is_union.h +++ b/libcxx/include/__type_traits/is_union.h @@ -18,8 +18,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template struct _LIBCPP_TEMPLATE_VIS is_union - : public integral_constant {}; +template +struct is_union : public integral_constant {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_unsigned.h b/libcxx/include/__type_traits/is_unsigned.h --- a/libcxx/include/__type_traits/is_unsigned.h +++ b/libcxx/include/__type_traits/is_unsigned.h @@ -23,7 +23,7 @@ #if __has_builtin(__is_unsigned) template -struct _LIBCPP_TEMPLATE_VIS is_unsigned : _BoolConstant<__is_unsigned(_Tp)> { }; +struct is_unsigned : _BoolConstant<__is_unsigned(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -43,7 +43,8 @@ template struct __libcpp_is_unsigned<_Tp, false> : public false_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {}; +template +struct is_unsigned : public __libcpp_is_unsigned<_Tp> {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_void.h b/libcxx/include/__type_traits/is_void.h --- a/libcxx/include/__type_traits/is_void.h +++ b/libcxx/include/__type_traits/is_void.h @@ -23,7 +23,7 @@ #if __has_builtin(__is_void) template -struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_void(_Tp)> { }; +struct is_void : _BoolConstant<__is_void(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -32,8 +32,8 @@ #else -template struct _LIBCPP_TEMPLATE_VIS is_void - : public is_same<__remove_cv_t<_Tp>, void> {}; +template +struct is_void : public is_same<__remove_cv_t<_Tp>, void> {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/is_volatile.h b/libcxx/include/__type_traits/is_volatile.h --- a/libcxx/include/__type_traits/is_volatile.h +++ b/libcxx/include/__type_traits/is_volatile.h @@ -21,7 +21,7 @@ #if __has_builtin(__is_volatile) template -struct _LIBCPP_TEMPLATE_VIS is_volatile : _BoolConstant<__is_volatile(_Tp)> { }; +struct is_volatile : _BoolConstant<__is_volatile(_Tp)> { }; #if _LIBCPP_STD_VER >= 17 template @@ -30,8 +30,8 @@ #else -template struct _LIBCPP_TEMPLATE_VIS is_volatile : public false_type {}; -template struct _LIBCPP_TEMPLATE_VIS is_volatile<_Tp volatile> : public true_type {}; +template struct is_volatile : public false_type {}; +template struct is_volatile<_Tp volatile> : public true_type {}; #if _LIBCPP_STD_VER >= 17 template diff --git a/libcxx/include/__type_traits/rank.h b/libcxx/include/__type_traits/rank.h --- a/libcxx/include/__type_traits/rank.h +++ b/libcxx/include/__type_traits/rank.h @@ -27,12 +27,12 @@ #else -template struct _LIBCPP_TEMPLATE_VIS rank - : public integral_constant {}; -template struct _LIBCPP_TEMPLATE_VIS rank<_Tp[]> - : public integral_constant::value + 1> {}; -template struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]> - : public integral_constant::value + 1> {}; +template +struct rank : public integral_constant {}; +template +struct rank<_Tp[]> : public integral_constant::value + 1> {}; +template +struct rank<_Tp[_Np]> : public integral_constant::value + 1> {}; #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 --- a/libcxx/include/__type_traits/remove_all_extents.h +++ b/libcxx/include/__type_traits/remove_all_extents.h @@ -27,12 +27,20 @@ template using __remove_all_extents_t = __remove_all_extents(_Tp); #else -template struct _LIBCPP_TEMPLATE_VIS remove_all_extents - {typedef _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[]> - {typedef typename remove_all_extents<_Tp>::type type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[_Np]> - {typedef typename remove_all_extents<_Tp>::type type;}; +template +struct remove_all_extents { + typedef _Tp type; +}; + +template +struct remove_all_extents<_Tp[]> { + typedef typename remove_all_extents<_Tp>::type type; +}; + +template +struct remove_all_extents<_Tp[_Np]> { + typedef typename remove_all_extents<_Tp>::type type; +}; template using __remove_all_extents_t = typename remove_all_extents<_Tp>::type; diff --git a/libcxx/include/__type_traits/remove_const.h b/libcxx/include/__type_traits/remove_const.h --- a/libcxx/include/__type_traits/remove_const.h +++ b/libcxx/include/__type_traits/remove_const.h @@ -26,8 +26,8 @@ template using __remove_const_t = __remove_const(_Tp); #else -template struct _LIBCPP_TEMPLATE_VIS remove_const {typedef _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_const {typedef _Tp type;}; +template struct remove_const {typedef _Tp type;}; +template struct remove_const {typedef _Tp type;}; template using __remove_const_t = typename remove_const<_Tp>::type; diff --git a/libcxx/include/__type_traits/remove_cv.h b/libcxx/include/__type_traits/remove_cv.h --- a/libcxx/include/__type_traits/remove_cv.h +++ b/libcxx/include/__type_traits/remove_cv.h @@ -28,7 +28,7 @@ template using __remove_cv_t = __remove_cv(_Tp); #else -template struct _LIBCPP_TEMPLATE_VIS remove_cv +template struct remove_cv {typedef __remove_volatile_t<__remove_const_t<_Tp> > type;}; template diff --git a/libcxx/include/__type_traits/remove_extent.h b/libcxx/include/__type_traits/remove_extent.h --- a/libcxx/include/__type_traits/remove_extent.h +++ b/libcxx/include/__type_traits/remove_extent.h @@ -27,11 +27,11 @@ template using __remove_extent_t = __remove_extent(_Tp); #else -template struct _LIBCPP_TEMPLATE_VIS remove_extent +template struct remove_extent {typedef _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[]> +template struct remove_extent<_Tp[]> {typedef _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[_Np]> +template struct remove_extent<_Tp[_Np]> {typedef _Tp type;}; template diff --git a/libcxx/include/__type_traits/remove_pointer.h b/libcxx/include/__type_traits/remove_pointer.h --- a/libcxx/include/__type_traits/remove_pointer.h +++ b/libcxx/include/__type_traits/remove_pointer.h @@ -26,11 +26,11 @@ template using __remove_pointer_t = __remove_pointer(_Tp); #else -template struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _LIBCPP_NODEBUG _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp*> {typedef _LIBCPP_NODEBUG _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const> {typedef _LIBCPP_NODEBUG _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* volatile> {typedef _LIBCPP_NODEBUG _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct remove_pointer {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct remove_pointer<_Tp*> {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct remove_pointer<_Tp* const> {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct remove_pointer<_Tp* volatile> {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct remove_pointer<_Tp* const volatile> {typedef _LIBCPP_NODEBUG _Tp type;}; template using __remove_pointer_t = typename remove_pointer<_Tp>::type; diff --git a/libcxx/include/__type_traits/remove_reference.h b/libcxx/include/__type_traits/remove_reference.h --- a/libcxx/include/__type_traits/remove_reference.h +++ b/libcxx/include/__type_traits/remove_reference.h @@ -27,9 +27,9 @@ template using __libcpp_remove_reference_t = __remove_reference_t(_Tp); #else -template struct _LIBCPP_TEMPLATE_VIS remove_reference {typedef _LIBCPP_NODEBUG _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct remove_reference {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct remove_reference<_Tp&> {typedef _LIBCPP_NODEBUG _Tp type;}; +template struct remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;}; template using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type; diff --git a/libcxx/include/__type_traits/remove_volatile.h b/libcxx/include/__type_traits/remove_volatile.h --- a/libcxx/include/__type_traits/remove_volatile.h +++ b/libcxx/include/__type_traits/remove_volatile.h @@ -26,8 +26,8 @@ template using __remove_volatile_t = __remove_volatile(_Tp); #else -template struct _LIBCPP_TEMPLATE_VIS remove_volatile {typedef _Tp type;}; -template struct _LIBCPP_TEMPLATE_VIS remove_volatile {typedef _Tp type;}; +template struct remove_volatile {typedef _Tp type;}; +template struct remove_volatile {typedef _Tp type;}; template using __remove_volatile_t = typename remove_volatile<_Tp>::type; diff --git a/libcxx/include/__type_traits/result_of.h b/libcxx/include/__type_traits/result_of.h --- a/libcxx/include/__type_traits/result_of.h +++ b/libcxx/include/__type_traits/result_of.h @@ -24,8 +24,7 @@ template class _LIBCPP_DEPRECATED_IN_CXX17 result_of; template -class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)> - : public __invoke_of<_Fp, _Args...> +class result_of<_Fp(_Args...)> : public __invoke_of<_Fp, _Args...> { }; diff --git a/libcxx/include/__utility/in_place.h b/libcxx/include/__utility/in_place.h --- a/libcxx/include/__utility/in_place.h +++ b/libcxx/include/__utility/in_place.h @@ -27,14 +27,14 @@ inline constexpr in_place_t in_place{}; template -struct _LIBCPP_TEMPLATE_VIS in_place_type_t { +struct in_place_type_t { _LIBCPP_HIDE_FROM_ABI explicit in_place_type_t() = default; }; template inline constexpr in_place_type_t<_Tp> in_place_type{}; template -struct _LIBCPP_TEMPLATE_VIS in_place_index_t { +struct in_place_index_t { _LIBCPP_HIDE_FROM_ABI explicit in_place_index_t() = default; }; template diff --git a/libcxx/include/__utility/integer_sequence.h b/libcxx/include/__utility/integer_sequence.h --- a/libcxx/include/__utility/integer_sequence.h +++ b/libcxx/include/__utility/integer_sequence.h @@ -88,7 +88,7 @@ #if _LIBCPP_STD_VER >= 14 template -struct _LIBCPP_TEMPLATE_VIS integer_sequence +struct integer_sequence { typedef _Tp value_type; static_assert( is_integral<_Tp>::value, diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h --- a/libcxx/include/__utility/pair.h +++ b/libcxx/include/__utility/pair.h @@ -74,7 +74,7 @@ #endif template -struct _LIBCPP_TEMPLATE_VIS pair +struct pair #if defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR) : private __non_trivially_copyable_base<_T1, _T2> #endif @@ -721,23 +721,22 @@ } template - struct _LIBCPP_TEMPLATE_VIS tuple_size > - : public integral_constant {}; + struct tuple_size > : public integral_constant {}; template -struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, pair<_T1, _T2> > +struct tuple_element<_Ip, pair<_T1, _T2> > { static_assert(_Ip < 2, "Index out of bounds in std::tuple_element>"); }; template -struct _LIBCPP_TEMPLATE_VIS tuple_element<0, pair<_T1, _T2> > +struct tuple_element<0, pair<_T1, _T2> > { using type _LIBCPP_NODEBUG = _T1; }; template -struct _LIBCPP_TEMPLATE_VIS tuple_element<1, pair<_T1, _T2> > +struct 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 --- 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 { explicit piecewise_construct_t() = default; }; +struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; #if _LIBCPP_STD_VER >= 17 inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); diff --git a/libcxx/include/__variant/monostate.h b/libcxx/include/__variant/monostate.h --- a/libcxx/include/__variant/monostate.h +++ b/libcxx/include/__variant/monostate.h @@ -23,7 +23,7 @@ #if _LIBCPP_STD_VER >= 17 -struct _LIBCPP_TEMPLATE_VIS monostate {}; +struct monostate {}; _LIBCPP_HIDE_FROM_ABI constexpr bool operator==(monostate, monostate) noexcept { return true; } @@ -48,7 +48,7 @@ # endif // _LIBCPP_STD_VER >= 20 template <> -struct _LIBCPP_TEMPLATE_VIS hash { +struct hash { using argument_type = monostate; using result_type = size_t; diff --git a/libcxx/include/any b/libcxx/include/any --- a/libcxx/include/any +++ b/libcxx/include/any @@ -139,7 +139,7 @@ } // Forward declarations -class _LIBCPP_TEMPLATE_VIS any; +class any; template _LIBCPP_INLINE_VISIBILITY @@ -176,7 +176,7 @@ template struct _LargeHandler; template - struct _LIBCPP_TEMPLATE_VIS __unique_typeinfo { static constexpr int __id = 0; }; + struct __unique_typeinfo { static constexpr int __id = 0; }; template constexpr int __unique_typeinfo<_Tp>::__id; template @@ -204,7 +204,7 @@ } // namespace __any_imp -class _LIBCPP_TEMPLATE_VIS any +class any { public: // construct/destruct @@ -366,7 +366,7 @@ namespace __any_imp { template - struct _LIBCPP_TEMPLATE_VIS _SmallHandler + struct _SmallHandler { _LIBCPP_INLINE_VISIBILITY static void* __handle(_Action __act, any const * __this, any * __other, @@ -449,7 +449,7 @@ }; template - struct _LIBCPP_TEMPLATE_VIS _LargeHandler + struct _LargeHandler { _LIBCPP_INLINE_VISIBILITY static void* __handle(_Action __act, any const * __this, diff --git a/libcxx/include/array b/libcxx/include/array --- a/libcxx/include/array +++ b/libcxx/include/array @@ -160,7 +160,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct _LIBCPP_TEMPLATE_VIS array +struct array { // types: typedef array __self; @@ -263,7 +263,7 @@ }; template -struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> +struct array<_Tp, 0> { // types: typedef array __self; @@ -453,11 +453,11 @@ } template -struct _LIBCPP_TEMPLATE_VIS tuple_size > +struct tuple_size > : public integral_constant {}; template -struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> > +struct tuple_element<_Ip, array<_Tp, _Size> > { static_assert(_Ip < _Size, "Index out of bounds in std::tuple_element<> (std::array)"); typedef _Tp type; diff --git a/libcxx/include/bitset b/libcxx/include/bitset --- a/libcxx/include/bitset +++ b/libcxx/include/bitset @@ -672,12 +672,11 @@ { } -template class _LIBCPP_TEMPLATE_VIS bitset; +template class bitset; template struct hash >; template -class _LIBCPP_TEMPLATE_VIS bitset - : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size> +class 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; @@ -1132,8 +1131,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS hash > - : public __unary_function, size_t> +struct hash > : public __unary_function, size_t> { _LIBCPP_INLINE_VISIBILITY size_t operator()(const bitset<_Size>& __bs) const _NOEXCEPT diff --git a/libcxx/include/codecvt b/libcxx/include/codecvt --- a/libcxx/include/codecvt +++ b/libcxx/include/codecvt @@ -184,7 +184,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8 +class _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8 : public __codecvt_utf8<_Elem> { public: @@ -413,7 +413,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf16 +class _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf16 : public __codecvt_utf16<_Elem, _Mode & little_endian> { public: @@ -538,8 +538,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8_utf16 - : public __codecvt_utf8_utf16<_Elem> +class _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8_utf16 : public __codecvt_utf8_utf16<_Elem> { public: _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/complex b/libcxx/include/complex --- a/libcxx/include/complex +++ b/libcxx/include/complex @@ -248,13 +248,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template class _LIBCPP_TEMPLATE_VIS complex; +template class complex; template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w); template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y); template -class _LIBCPP_TEMPLATE_VIS complex +class complex { public: typedef _Tp value_type; @@ -312,11 +312,11 @@ } }; -template<> class _LIBCPP_TEMPLATE_VIS complex; -template<> class _LIBCPP_TEMPLATE_VIS complex; +template<> class complex; +template<> class complex; template<> -class _LIBCPP_TEMPLATE_VIS complex +class complex { float __re_; float __im_; @@ -374,7 +374,7 @@ }; template<> -class _LIBCPP_TEMPLATE_VIS complex +class complex { double __re_; double __im_; @@ -432,7 +432,7 @@ }; template<> -class _LIBCPP_TEMPLATE_VIS complex +class complex { long double __re_; long double __im_; diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -244,7 +244,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template > class _LIBCPP_TEMPLATE_VIS deque; +template > class deque; template struct __deque_block_size { @@ -261,7 +261,7 @@ __deque_block_size<_ValueType, _DiffType>::value #endif > -class _LIBCPP_TEMPLATE_VIS __deque_iterator +class __deque_iterator { typedef _MapPointer __map_iterator; public: @@ -412,9 +412,9 @@ _LIBCPP_HIDE_FROM_ABI explicit __deque_iterator(__map_iterator __m, pointer __p) _NOEXCEPT : __m_iter_(__m), __ptr_(__p) {} - template friend class _LIBCPP_TEMPLATE_VIS deque; + template friend class deque; template - friend class _LIBCPP_TEMPLATE_VIS __deque_iterator; + friend class __deque_iterator; template friend struct __segmented_iterator_traits; @@ -455,7 +455,7 @@ __deque_block_size<_ValueType, _DiffType>::value; template */> -class _LIBCPP_TEMPLATE_VIS deque +class deque { public: // types: diff --git a/libcxx/include/experimental/memory_resource b/libcxx/include/experimental/memory_resource --- a/libcxx/include/experimental/memory_resource +++ b/libcxx/include/experimental/memory_resource @@ -158,7 +158,7 @@ // 8.6.1, memory.polymorphic.allocator.overview template -class _LIBCPP_DEPCREATED_MEMORY_RESOURCE("polymorphic_allocator") _LIBCPP_TEMPLATE_VIS polymorphic_allocator +class _LIBCPP_DEPCREATED_MEMORY_RESOURCE("polymorphic_allocator") polymorphic_allocator { public: typedef _ValueType value_type; @@ -341,8 +341,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH // 8.7.1, memory.resource.adaptor.overview template -class _LIBCPP_TEMPLATE_VIS __resource_adaptor_imp - : public memory_resource +class __resource_adaptor_imp : public memory_resource { using _CTraits = allocator_traits<_CharAlloc>; static_assert(is_same::value diff --git a/libcxx/include/experimental/type_traits b/libcxx/include/experimental/type_traits --- a/libcxx/include/experimental/type_traits +++ b/libcxx/include/experimental/type_traits @@ -85,16 +85,16 @@ // 3.3.2, Other type transformations /* template -class _LIBCPP_TEMPLATE_VIS raw_invocation_type; +class raw_invocation_type; template -class _LIBCPP_TEMPLATE_VIS raw_invocation_type<_Fn(_Args...)>; +class raw_invocation_type<_Fn(_Args...)>; template -class _LIBCPP_TEMPLATE_VIS invokation_type; +class invokation_type; template -class _LIBCPP_TEMPLATE_VIS invokation_type<_Fn(_Args...)>; +class invokation_type<_Fn(_Args...)>; template using invokation_type_t = typename invokation_type<_Tp>::type; diff --git a/libcxx/include/experimental/utility b/libcxx/include/experimental/utility --- a/libcxx/include/experimental/utility +++ b/libcxx/include/experimental/utility @@ -40,7 +40,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS - struct _LIBCPP_TEMPLATE_VIS erased_type { }; +struct erased_type {}; _LIBCPP_END_NAMESPACE_LFTS diff --git a/libcxx/include/ext/__hash b/libcxx/include/ext/__hash --- a/libcxx/include/ext/__hash +++ b/libcxx/include/ext/__hash @@ -19,10 +19,11 @@ namespace __gnu_cxx { -template struct _LIBCPP_TEMPLATE_VIS hash { }; +template +struct hash {}; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(const char *__c) const _NOEXCEPT @@ -31,8 +32,8 @@ } }; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(char *__c) const _NOEXCEPT @@ -41,8 +42,8 @@ } }; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(char __c) const _NOEXCEPT @@ -51,8 +52,8 @@ } }; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(signed char __c) const _NOEXCEPT @@ -61,8 +62,8 @@ } }; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(unsigned char __c) const _NOEXCEPT @@ -71,8 +72,8 @@ } }; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(short __c) const _NOEXCEPT @@ -81,8 +82,8 @@ } }; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(unsigned short __c) const _NOEXCEPT @@ -91,8 +92,8 @@ } }; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(int __c) const _NOEXCEPT @@ -101,8 +102,8 @@ } }; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(unsigned int __c) const _NOEXCEPT @@ -111,8 +112,8 @@ } }; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(long __c) const _NOEXCEPT @@ -121,8 +122,8 @@ } }; -template <> struct _LIBCPP_TEMPLATE_VIS hash - : public std::__unary_function +template <> +struct hash : public std::__unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(unsigned long __c) const _NOEXCEPT diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map --- a/libcxx/include/ext/hash_map +++ b/libcxx/include/ext/hash_map @@ -366,7 +366,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS __hash_map_iterator +class __hash_map_iterator { _HashIterator __i_; @@ -403,15 +403,15 @@ bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y) {return __x.__i_ != __y.__i_;} - template friend class _LIBCPP_TEMPLATE_VIS hash_map; - template friend class _LIBCPP_TEMPLATE_VIS hash_multimap; - template friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator; - template friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator; - template friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator; + template friend class hash_map; + template friend class hash_multimap; + template friend class __hash_const_iterator; + template friend class __hash_const_local_iterator; + template friend class __hash_map_const_iterator; }; template -class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator +class __hash_map_const_iterator { _HashIterator __i_; @@ -456,15 +456,15 @@ bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y) {return __x.__i_ != __y.__i_;} - template friend class _LIBCPP_TEMPLATE_VIS hash_map; - template friend class _LIBCPP_TEMPLATE_VIS hash_multimap; - template friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator; - template friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator; + template friend class hash_map; + template friend class hash_multimap; + template friend class __hash_const_iterator; + template friend class __hash_const_local_iterator; }; template , class _Pred = std::equal_to<_Key>, class _Alloc = std::allocator > > -class _LIBCPP_TEMPLATE_VIS hash_map +class hash_map { public: // types @@ -737,7 +737,7 @@ template , class _Pred = std::equal_to<_Key>, class _Alloc = std::allocator > > -class _LIBCPP_TEMPLATE_VIS hash_multimap +class hash_multimap { public: // types diff --git a/libcxx/include/ext/hash_set b/libcxx/include/ext/hash_set --- a/libcxx/include/ext/hash_set +++ b/libcxx/include/ext/hash_set @@ -216,7 +216,7 @@ template , class _Pred = std::equal_to<_Value>, class _Alloc = std::allocator<_Value> > -class _LIBCPP_TEMPLATE_VIS hash_set +class hash_set { public: // types @@ -437,7 +437,7 @@ template , class _Pred = std::equal_to<_Value>, class _Alloc = std::allocator<_Value> > -class _LIBCPP_TEMPLATE_VIS hash_multiset +class hash_multiset { public: // types diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -311,11 +311,11 @@ }; -template > class _LIBCPP_TEMPLATE_VIS forward_list; -template class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator; +template > class forward_list; +template class __forward_list_const_iterator; template -class _LIBCPP_TEMPLATE_VIS __forward_list_iterator +class __forward_list_iterator { typedef __forward_node_traits<_NodePtr> __traits; typedef typename __traits::__node_pointer __node_pointer; @@ -347,8 +347,8 @@ explicit __forward_list_iterator(__node_pointer __p) _NOEXCEPT : __ptr_(__traits::__as_iter_node(__p)) {} - template friend class _LIBCPP_TEMPLATE_VIS forward_list; - template friend class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator; + template friend class forward_list; + template friend class __forward_list_const_iterator; public: typedef forward_iterator_tag iterator_category; @@ -393,7 +393,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator +class __forward_list_const_iterator { static_assert((!is_const::element_type>::value), ""); typedef _NodeConstPtr _NodePtr; @@ -649,8 +649,7 @@ } template */> -class _LIBCPP_TEMPLATE_VIS forward_list - : private __forward_list_base<_Tp, _Alloc> +class forward_list : private __forward_list_base<_Tp, _Alloc> { typedef __forward_list_base<_Tp, _Alloc> base; typedef typename base::__node_allocator __node_allocator; diff --git a/libcxx/include/fstream b/libcxx/include/fstream --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -214,8 +214,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS basic_filebuf - : public basic_streambuf<_CharT, _Traits> +class basic_filebuf : public basic_streambuf<_CharT, _Traits> { public: typedef _CharT char_type; @@ -1148,8 +1147,7 @@ // basic_ifstream template -class _LIBCPP_TEMPLATE_VIS basic_ifstream - : public basic_istream<_CharT, _Traits> +class basic_ifstream : public basic_istream<_CharT, _Traits> { public: typedef _CharT char_type; @@ -1348,8 +1346,7 @@ // basic_ofstream template -class _LIBCPP_TEMPLATE_VIS basic_ofstream - : public basic_ostream<_CharT, _Traits> +class basic_ofstream : public basic_ostream<_CharT, _Traits> { public: typedef _CharT char_type; @@ -1549,8 +1546,7 @@ // basic_fstream template -class _LIBCPP_TEMPLATE_VIS basic_fstream - : public basic_iostream<_CharT, _Traits> +class basic_fstream : public basic_iostream<_CharT, _Traits> { public: typedef _CharT char_type; diff --git a/libcxx/include/future b/libcxx/include/future --- a/libcxx/include/future +++ b/libcxx/include/future @@ -412,11 +412,11 @@ _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(future_errc) template <> -struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public true_type {}; +struct is_error_code_enum : public true_type {}; #ifdef _LIBCPP_CXX03_LANG template <> -struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public true_type { }; +struct is_error_code_enum : public true_type { }; #endif //enum class launch @@ -1035,12 +1035,12 @@ base::__on_zero_shared(); } -template class _LIBCPP_TEMPLATE_VIS promise; -template class _LIBCPP_TEMPLATE_VIS shared_future; +template class promise; +template class shared_future; // future -template class _LIBCPP_TEMPLATE_VIS future; +template class future; template _LIBCPP_INLINE_VISIBILITY future<_Rp> @@ -1051,7 +1051,7 @@ __make_async_assoc_state(_Fp&& __f); template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future +class _LIBCPP_AVAILABILITY_FUTURE future { __assoc_state<_Rp>* __state_; @@ -1138,7 +1138,7 @@ } template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future<_Rp&> +class _LIBCPP_AVAILABILITY_FUTURE future<_Rp&> { __assoc_state<_Rp&>* __state_; @@ -1290,7 +1290,7 @@ template class packaged_task; template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE promise +class _LIBCPP_AVAILABILITY_FUTURE promise { __assoc_state<_Rp>* __state_; @@ -1434,7 +1434,7 @@ // promise template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE promise<_Rp&> +class _LIBCPP_AVAILABILITY_FUTURE promise<_Rp&> { __assoc_state<_Rp&>* __state_; @@ -1624,8 +1624,7 @@ } template - struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> - : public true_type {}; +struct uses_allocator, _Alloc> : public true_type {}; // packaged_task @@ -1892,7 +1891,7 @@ } template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE packaged_task<_Rp(_ArgTypes...)> +class _LIBCPP_AVAILABILITY_FUTURE packaged_task<_Rp(_ArgTypes...)> { public: typedef _Rp result_type; // extension @@ -2007,7 +2006,7 @@ } template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE packaged_task +class _LIBCPP_AVAILABILITY_FUTURE packaged_task { public: typedef void result_type; // extension @@ -2142,8 +2141,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> - : public true_type {}; +struct uses_allocator, _Alloc> : public true_type {}; template _LIBCPP_INLINE_VISIBILITY future<_Rp> @@ -2238,7 +2236,7 @@ // shared_future template -class _LIBCPP_TEMPLATE_VIS shared_future +class shared_future { __assoc_state<_Rp>* __state_; @@ -2308,7 +2306,7 @@ } template -class _LIBCPP_TEMPLATE_VIS shared_future<_Rp&> +class shared_future<_Rp&> { __assoc_state<_Rp&>* __state_; diff --git a/libcxx/include/initializer_list b/libcxx/include/initializer_list --- a/libcxx/include/initializer_list +++ b/libcxx/include/initializer_list @@ -56,7 +56,7 @@ #ifndef _LIBCPP_CXX03_LANG template -class _LIBCPP_TEMPLATE_VIS initializer_list +class initializer_list { const _Ep* __begin_; size_t __size_; diff --git a/libcxx/include/ios b/libcxx/include/ios --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -417,11 +417,11 @@ _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(io_errc) template <> -struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public true_type { }; +struct is_error_code_enum : public true_type { }; #ifdef _LIBCPP_CXX03_LANG template <> -struct _LIBCPP_TEMPLATE_VIS is_error_code_enum : public true_type { }; +struct is_error_code_enum : public true_type { }; #endif _LIBCPP_FUNC_VIS @@ -607,8 +607,7 @@ } template -class _LIBCPP_TEMPLATE_VIS basic_ios - : public ios_base +class basic_ios : public ios_base { public: // types: diff --git a/libcxx/include/iosfwd b/libcxx/include/iosfwd --- a/libcxx/include/iosfwd +++ b/libcxx/include/iosfwd @@ -115,11 +115,13 @@ class _LIBCPP_TYPE_VIS ios_base; template > - class _LIBCPP_TEMPLATE_VIS istreambuf_iterator; +class istreambuf_iterator; template > - class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator; +class ostreambuf_iterator; + +template +class fpos; -template class _LIBCPP_TEMPLATE_VIS fpos; typedef fpos streampos; typedef fpos wstreampos; #ifndef _LIBCPP_HAS_NO_CHAR8_T @@ -130,7 +132,7 @@ // Include other forward declarations here template > -class _LIBCPP_TEMPLATE_VIS vector; +class vector; template class __save_flags diff --git a/libcxx/include/istream b/libcxx/include/istream --- a/libcxx/include/istream +++ b/libcxx/include/istream @@ -181,8 +181,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS basic_istream - : virtual public basic_ios<_CharT, _Traits> +class basic_istream : virtual public basic_ios<_CharT, _Traits> { streamsize __gc_; public: @@ -217,7 +216,7 @@ public: // 27.7.1.1.3 Prefix/suffix: - class _LIBCPP_TEMPLATE_VIS sentry; + class sentry; // 27.7.1.2 Formatted input: inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 @@ -294,7 +293,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS basic_istream<_CharT, _Traits>::sentry +class basic_istream<_CharT, _Traits>::sentry { bool __ok_; @@ -1395,11 +1394,8 @@ } template -class _LIBCPP_TEMPLATE_VIS basic_iostream - : public basic_istream<_CharT, _Traits>, - public basic_ostream<_CharT, _Traits> -{ -public: +class basic_iostream : public basic_istream<_CharT, _Traits>, public basic_ostream<_CharT, _Traits> { + public: // types: typedef _CharT char_type; typedef _Traits traits_type; diff --git a/libcxx/include/limits b/libcxx/include/limits --- a/libcxx/include/limits +++ b/libcxx/include/limits @@ -448,8 +448,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS numeric_limits - : private __libcpp_numeric_limits<__remove_cv_t<_Tp> > +class numeric_limits : private __libcpp_numeric_limits<__remove_cv_t<_Tp> > { typedef __libcpp_numeric_limits<__remove_cv_t<_Tp> > __base; typedef typename __base::type type; @@ -541,8 +540,7 @@ _LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style; template -class _LIBCPP_TEMPLATE_VIS numeric_limits - : private numeric_limits<_Tp> +class numeric_limits : private numeric_limits<_Tp> { typedef numeric_limits<_Tp> __base; typedef _Tp type; @@ -634,8 +632,7 @@ _LIBCPP_CONSTEXPR const float_round_style numeric_limits::round_style; template -class _LIBCPP_TEMPLATE_VIS numeric_limits - : private numeric_limits<_Tp> +class numeric_limits : private numeric_limits<_Tp> { typedef numeric_limits<_Tp> __base; typedef _Tp type; @@ -727,8 +724,7 @@ _LIBCPP_CONSTEXPR const float_round_style numeric_limits::round_style; template -class _LIBCPP_TEMPLATE_VIS numeric_limits - : private numeric_limits<_Tp> +class numeric_limits : private numeric_limits<_Tp> { typedef numeric_limits<_Tp> __base; typedef _Tp type; diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -317,12 +317,15 @@ } }; -template > class _LIBCPP_TEMPLATE_VIS list; +template > +class list; + template class __list_imp; -template class _LIBCPP_TEMPLATE_VIS __list_const_iterator; +template +class __list_const_iterator; template -class _LIBCPP_TEMPLATE_VIS __list_iterator +class __list_iterator { typedef __list_node_pointer_traits<_Tp, _VoidPtr> _NodeTraits; typedef typename _NodeTraits::__link_pointer __link_pointer; @@ -431,7 +434,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS __list_const_iterator +class __list_const_iterator { typedef __list_node_pointer_traits<_Tp, _VoidPtr> _NodeTraits; typedef typename _NodeTraits::__link_pointer __link_pointer; @@ -818,8 +821,7 @@ } template */> -class _LIBCPP_TEMPLATE_VIS list - : private __list_imp<_Tp, _Alloc> +class list : private __list_imp<_Tp, _Alloc> { typedef __list_imp<_Tp, _Alloc> base; typedef typename base::__node __node; diff --git a/libcxx/include/locale b/libcxx/include/locale --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -590,9 +590,7 @@ #endif template > -class _LIBCPP_TEMPLATE_VIS num_get - : public locale::facet, - private __num_get<_CharT> +class num_get : public locale::facet, private __num_get<_CharT> { public: typedef _CharT char_type; @@ -1281,9 +1279,7 @@ #endif template > -class _LIBCPP_TEMPLATE_VIS num_put - : public locale::facet, - private __num_put<_CharT> +class num_put : public locale::facet, private __num_put<_CharT> { public: typedef _CharT char_type; @@ -1690,7 +1686,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS __time_get_c_storage +class __time_get_c_storage { protected: typedef basic_string<_CharT> string_type; @@ -1726,10 +1722,7 @@ #endif template > -class _LIBCPP_TEMPLATE_VIS time_get - : public locale::facet, - public time_base, - private __time_get_c_storage<_CharT> +class time_get : public locale::facet, public time_base, private __time_get_c_storage<_CharT> { public: typedef _CharT char_type; @@ -2350,8 +2343,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS __time_get_storage - : public __time_get +class __time_get_storage : public __time_get { protected: typedef basic_string<_CharT> string_type; @@ -2396,9 +2388,7 @@ #undef _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION template > -class _LIBCPP_TEMPLATE_VIS time_get_byname - : public time_get<_CharT, _InputIterator>, - private __time_get_storage<_CharT> +class time_get_byname : public time_get<_CharT, _InputIterator>, private __time_get_storage<_CharT> { public: typedef time_base::dateorder dateorder; @@ -2451,9 +2441,7 @@ }; template > -class _LIBCPP_TEMPLATE_VIS time_put - : public locale::facet, - private __time_put +class time_put : public locale::facet, private __time_put { public: typedef _CharT char_type; @@ -2551,8 +2539,7 @@ #endif template > -class _LIBCPP_TEMPLATE_VIS time_put_byname - : public time_put<_CharT, _OutputIterator> +class time_put_byname : public time_put<_CharT, _OutputIterator> { public: _LIBCPP_INLINE_VISIBILITY @@ -2586,9 +2573,7 @@ // moneypunct template -class _LIBCPP_TEMPLATE_VIS moneypunct - : public locale::facet, - public money_base +class moneypunct : public locale::facet, public money_base { public: typedef _CharT char_type; @@ -2645,8 +2630,7 @@ // moneypunct_byname template -class _LIBCPP_TEMPLATE_VIS moneypunct_byname - : public moneypunct<_CharT, _International> +class moneypunct_byname : public moneypunct<_CharT, _International> { public: typedef money_base::pattern pattern; @@ -2760,9 +2744,7 @@ #endif template > -class _LIBCPP_TEMPLATE_VIS money_get - : public locale::facet, - private __money_get<_CharT> +class money_get : public locale::facet, private __money_get<_CharT> { public: typedef _CharT char_type; @@ -3304,9 +3286,7 @@ #endif template > -class _LIBCPP_TEMPLATE_VIS money_put - : public locale::facet, - private __money_put<_CharT> +class money_put : public locale::facet, private __money_put<_CharT> { public: typedef _CharT char_type; @@ -3468,9 +3448,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS messages - : public locale::facet, - public messages_base +class messages : public locale::facet, public messages_base { public: typedef _CharT char_type; @@ -3575,8 +3553,7 @@ #endif template -class _LIBCPP_TEMPLATE_VIS messages_byname - : public messages<_CharT> +class messages_byname : public messages<_CharT> { public: typedef messages_base::catalog catalog; @@ -3602,7 +3579,7 @@ template, class _Byte_alloc = allocator > -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert +class _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert { public: typedef basic_string, _Byte_alloc> byte_string; @@ -3871,8 +3848,7 @@ } template > -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wbuffer_convert - : public basic_streambuf<_Elem, _Tr> +class _LIBCPP_DEPRECATED_IN_CXX17 wbuffer_convert : public basic_streambuf<_Elem, _Tr> { public: // types: diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -855,7 +855,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS __map_iterator +class __map_iterator { typedef typename _TreeIterator::_NodeTypes _NodeTypes; typedef typename _TreeIterator::__pointer_traits __pointer_traits; @@ -908,13 +908,13 @@ bool operator!=(const __map_iterator& __x, const __map_iterator& __y) {return __x.__i_ != __y.__i_;} - template friend class _LIBCPP_TEMPLATE_VIS map; - template friend class _LIBCPP_TEMPLATE_VIS multimap; - template friend class _LIBCPP_TEMPLATE_VIS __map_const_iterator; + template friend class map; + template friend class multimap; + template friend class __map_const_iterator; }; template -class _LIBCPP_TEMPLATE_VIS __map_const_iterator +class __map_const_iterator { typedef typename _TreeIterator::_NodeTypes _NodeTypes; typedef typename _TreeIterator::__pointer_traits __pointer_traits; @@ -970,14 +970,14 @@ bool operator!=(const __map_const_iterator& __x, const __map_const_iterator& __y) {return __x.__i_ != __y.__i_;} - template friend class _LIBCPP_TEMPLATE_VIS map; - template friend class _LIBCPP_TEMPLATE_VIS multimap; - template friend class _LIBCPP_TEMPLATE_VIS __tree_const_iterator; + template friend class map; + template friend class multimap; + template friend class __tree_const_iterator; }; template , class _Allocator = allocator > > -class _LIBCPP_TEMPLATE_VIS map +class map { public: // types: @@ -992,8 +992,7 @@ static_assert((is_same::value), "Allocator::value_type must be same type as value_type"); - class _LIBCPP_TEMPLATE_VIS value_compare - : public __binary_function + class value_compare : public __binary_function { friend class map; protected: @@ -1037,9 +1036,9 @@ #endif template - friend class _LIBCPP_TEMPLATE_VIS map; + friend class map; template - friend class _LIBCPP_TEMPLATE_VIS multimap; + friend class multimap; _LIBCPP_INLINE_VISIBILITY map() @@ -1773,7 +1772,7 @@ template , class _Allocator = allocator > > -class _LIBCPP_TEMPLATE_VIS multimap +class multimap { public: // types: @@ -1788,7 +1787,7 @@ static_assert((is_same::value), "Allocator::value_type must be same type as value_type"); - class _LIBCPP_TEMPLATE_VIS value_compare + class value_compare : public __binary_function { friend class multimap; @@ -1833,9 +1832,9 @@ #endif template - friend class _LIBCPP_TEMPLATE_VIS map; + friend class map; template - friend class _LIBCPP_TEMPLATE_VIS multimap; + friend class multimap; _LIBCPP_INLINE_VISIBILITY multimap() diff --git a/libcxx/include/mutex b/libcxx/include/mutex --- a/libcxx/include/mutex +++ b/libcxx/include/mutex @@ -475,10 +475,10 @@ #if _LIBCPP_STD_VER >= 17 template -class _LIBCPP_TEMPLATE_VIS scoped_lock; +class scoped_lock; template <> -class _LIBCPP_TEMPLATE_VIS scoped_lock<> { +class scoped_lock<> { public: explicit scoped_lock() {} ~scoped_lock() = default; @@ -491,7 +491,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) scoped_lock<_Mutex> { +class _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) scoped_lock<_Mutex> { public: typedef _Mutex mutex_type; private: @@ -511,7 +511,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS scoped_lock +class scoped_lock { static_assert(sizeof...(_MArgs) > 1, "At least 2 lock types required"); typedef tuple<_MArgs&...> _MutexTuple; @@ -553,7 +553,7 @@ #endif // _LIBCPP_STD_VER >= 17 #endif // !_LIBCPP_HAS_NO_THREADS -struct _LIBCPP_TEMPLATE_VIS once_flag; +struct once_flag; #ifndef _LIBCPP_CXX03_LANG @@ -573,7 +573,7 @@ #endif // _LIBCPP_CXX03_LANG -struct _LIBCPP_TEMPLATE_VIS once_flag +struct once_flag { _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR diff --git a/libcxx/include/new b/libcxx/include/new --- a/libcxx/include/new +++ b/libcxx/include/new @@ -185,7 +185,7 @@ #if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) && \ !defined(_LIBCPP_ABI_VCRUNTIME) #ifndef _LIBCPP_CXX03_LANG -enum class _LIBCPP_ENUM_VIS align_val_t : size_t { }; +enum class align_val_t : size_t { }; #else enum align_val_t { __zero = 0, __max = (size_t)-1 }; #endif diff --git a/libcxx/include/optional b/libcxx/include/optional --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -1649,9 +1649,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS hash< - __enable_hash_helper, remove_const_t<_Tp>> -> +struct hash<__enable_hash_helper, 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; diff --git a/libcxx/include/ostream b/libcxx/include/ostream --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -189,8 +189,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS basic_ostream - : virtual public basic_ios<_CharT, _Traits> +class basic_ostream : virtual public basic_ios<_CharT, _Traits> { public: // types (inherited from basic_ios (27.5.4)): @@ -222,7 +221,7 @@ public: // 27.7.2.4 Prefix/suffix: - class _LIBCPP_TEMPLATE_VIS sentry; + class sentry; // 27.7.2.6 Formatted output: inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 @@ -288,7 +287,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS basic_ostream<_CharT, _Traits>::sentry +class basic_ostream<_CharT, _Traits>::sentry { bool __ok_; basic_ostream<_CharT, _Traits>& __os_; diff --git a/libcxx/include/queue b/libcxx/include/queue --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -285,7 +285,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template > class _LIBCPP_TEMPLATE_VIS queue; +template > class queue; template _LIBCPP_INLINE_VISIBILITY @@ -298,7 +298,7 @@ operator< (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y); template */> -class _LIBCPP_TEMPLATE_VIS queue +class queue { public: typedef _Container container_type; @@ -575,14 +575,11 @@ } template -struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> - : public uses_allocator<_Container, _Alloc> -{ -}; +struct uses_allocator, _Alloc> : public uses_allocator<_Container, _Alloc> {}; template , class _Compare = less > -class _LIBCPP_TEMPLATE_VIS priority_queue +class priority_queue { public: typedef _Container container_type; @@ -1122,10 +1119,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> - : public uses_allocator<_Container, _Alloc> -{ -}; +struct uses_allocator, _Alloc> : public uses_allocator<_Container, _Alloc> {}; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/ratio b/libcxx/include/ratio --- a/libcxx/include/ratio +++ b/libcxx/include/ratio @@ -247,7 +247,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS ratio +class ratio { static_assert(__static_abs<_Num>::value >= 0, "ratio numerator is out of range"); static_assert(_Den != 0, "ratio divide by 0"); @@ -311,8 +311,7 @@ #else // _LIBCPP_CXX03_LANG template -struct _LIBCPP_TEMPLATE_VIS ratio_multiply - : public __ratio_multiply<_R1, _R2>::type {}; +struct ratio_multiply : public __ratio_multiply<_R1, _R2>::type {}; #endif // _LIBCPP_CXX03_LANG @@ -338,8 +337,7 @@ #else // _LIBCPP_CXX03_LANG template -struct _LIBCPP_TEMPLATE_VIS ratio_divide - : public __ratio_divide<_R1, _R2>::type {}; +struct ratio_divide : public __ratio_divide<_R1, _R2>::type {}; #endif // _LIBCPP_CXX03_LANG @@ -373,8 +371,7 @@ #else // _LIBCPP_CXX03_LANG template -struct _LIBCPP_TEMPLATE_VIS ratio_add - : public __ratio_add<_R1, _R2>::type {}; +struct ratio_add : public __ratio_add<_R1, _R2>::type {}; #endif // _LIBCPP_CXX03_LANG @@ -408,20 +405,17 @@ #else // _LIBCPP_CXX03_LANG template -struct _LIBCPP_TEMPLATE_VIS ratio_subtract - : public __ratio_subtract<_R1, _R2>::type {}; +struct ratio_subtract : public __ratio_subtract<_R1, _R2>::type {}; #endif // _LIBCPP_CXX03_LANG // ratio_equal template -struct _LIBCPP_TEMPLATE_VIS ratio_equal - : _BoolConstant<(_R1::num == _R2::num && _R1::den == _R2::den)> {}; +struct ratio_equal : _BoolConstant<(_R1::num == _R2::num && _R1::den == _R2::den)> {}; template -struct _LIBCPP_TEMPLATE_VIS ratio_not_equal - : _BoolConstant::value> {}; +struct ratio_not_equal : _BoolConstant::value> {}; // ratio_less @@ -479,20 +473,16 @@ }; template -struct _LIBCPP_TEMPLATE_VIS ratio_less - : _BoolConstant<__ratio_less<_R1, _R2>::value> {}; +struct ratio_less : _BoolConstant<__ratio_less<_R1, _R2>::value> {}; template -struct _LIBCPP_TEMPLATE_VIS ratio_less_equal - : _BoolConstant::value> {}; +struct ratio_less_equal : _BoolConstant::value> {}; template -struct _LIBCPP_TEMPLATE_VIS ratio_greater - : _BoolConstant::value> {}; +struct ratio_greater : _BoolConstant::value> {}; template -struct _LIBCPP_TEMPLATE_VIS ratio_greater_equal - : _BoolConstant::value> {}; +struct ratio_greater_equal : _BoolConstant::value> {}; template struct __ratio_gcd diff --git a/libcxx/include/regex b/libcxx/include/regex --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -1044,7 +1044,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS regex_traits +struct regex_traits { public: typedef _CharT char_type; @@ -1419,11 +1419,11 @@ template class __node; -template class _LIBCPP_TEMPLATE_VIS sub_match; +template class sub_match; template > > -class _LIBCPP_TEMPLATE_VIS match_results; +class match_results; template struct __state @@ -2632,7 +2632,7 @@ template class __lookahead; template > - class _LIBCPP_TEMPLATE_VIS basic_regex; + class basic_regex; typedef basic_regex regex; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS @@ -2640,11 +2640,7 @@ #endif template -class - _LIBCPP_TEMPLATE_VIS - _LIBCPP_PREFERRED_NAME(regex) - _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wregex)) - basic_regex +class _LIBCPP_PREFERRED_NAME(regex) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wregex)) basic_regex { public: // types: @@ -4993,16 +4989,14 @@ typedef sub_match wssub_match; #endif +// clang-format off template -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> -{ +class _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> { +// clang-format on public: typedef _BidirectionalIterator iterator; typedef typename iterator_traits::value_type value_type; @@ -5470,15 +5464,14 @@ typedef match_results wsmatch; #endif +// clang-format off template -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 -{ +class _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 { +// clang-format on public: typedef _Allocator allocator_type; typedef sub_match<_BidirectionalIterator> value_type; @@ -6381,7 +6374,7 @@ template ::value_type, class _Traits = regex_traits<_CharT> > - class _LIBCPP_TEMPLATE_VIS regex_iterator; +class regex_iterator; typedef regex_iterator cregex_iterator; typedef regex_iterator sregex_iterator; @@ -6390,15 +6383,14 @@ typedef regex_iterator wsregex_iterator; #endif +// clang-format off template -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 -{ +class _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 { +// clang-format on public: typedef basic_regex<_CharT, _Traits> regex_type; typedef match_results<_BidirectionalIterator> value_type; @@ -6511,7 +6503,7 @@ template ::value_type, class _Traits = regex_traits<_CharT> > - class _LIBCPP_TEMPLATE_VIS regex_token_iterator; +class regex_token_iterator; typedef regex_token_iterator cregex_token_iterator; typedef regex_token_iterator sregex_token_iterator; @@ -6520,15 +6512,14 @@ typedef regex_token_iterator wsregex_token_iterator; #endif +// clang-format off template -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 -{ +class _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 { +// clang-format on public: typedef basic_regex<_CharT, _Traits> regex_type; typedef sub_match<_BidirectionalIterator> value_type; diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator --- a/libcxx/include/scoped_allocator +++ b/libcxx/include/scoped_allocator @@ -401,7 +401,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...> +class scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...> : public __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...> { typedef __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...> base; diff --git a/libcxx/include/set b/libcxx/include/set --- a/libcxx/include/set +++ b/libcxx/include/set @@ -521,7 +521,7 @@ template , class _Allocator = allocator<_Key> > -class _LIBCPP_TEMPLATE_VIS set +class set { public: // types: @@ -562,9 +562,9 @@ #endif template - friend class _LIBCPP_TEMPLATE_VIS set; + friend class set; template - friend class _LIBCPP_TEMPLATE_VIS multiset; + friend class multiset; _LIBCPP_INLINE_VISIBILITY set() @@ -1071,7 +1071,7 @@ template , class _Allocator = allocator<_Key> > -class _LIBCPP_TEMPLATE_VIS multiset +class multiset { public: // types: @@ -1111,9 +1111,9 @@ #endif template - friend class _LIBCPP_TEMPLATE_VIS set; + friend class set; template - friend class _LIBCPP_TEMPLATE_VIS multiset; + friend class multiset; // construct/copy/destroy: _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/span b/libcxx/include/span --- a/libcxx/include/span +++ b/libcxx/include/span @@ -203,7 +203,7 @@ concept __span_compatible_sentinel_for = sized_sentinel_for<_Sentinel, _It> && !is_convertible_v<_Sentinel, size_t>; template -class _LIBCPP_TEMPLATE_VIS span { +class span { public: // constants and types using element_type = _Tp; @@ -387,7 +387,7 @@ template -class _LIBCPP_TEMPLATE_VIS span<_Tp, dynamic_extent> { +class span<_Tp, dynamic_extent> { public: // constants and types using element_type = _Tp; diff --git a/libcxx/include/sstream b/libcxx/include/sstream --- a/libcxx/include/sstream +++ b/libcxx/include/sstream @@ -211,8 +211,7 @@ // Class template basic_stringbuf [stringbuf] template -class _LIBCPP_TEMPLATE_VIS basic_stringbuf - : public basic_streambuf<_CharT, _Traits> +class basic_stringbuf : public basic_streambuf<_CharT, _Traits> { public: typedef _CharT char_type; @@ -654,8 +653,7 @@ // Class template basic_istringstream [istringstream] template -class _LIBCPP_TEMPLATE_VIS basic_istringstream - : public basic_istream<_CharT, _Traits> +class basic_istringstream : public basic_istream<_CharT, _Traits> { public: typedef _CharT char_type; @@ -740,8 +738,7 @@ // Class template basic_ostringstream [ostringstream] template -class _LIBCPP_TEMPLATE_VIS basic_ostringstream - : public basic_ostream<_CharT, _Traits> +class basic_ostringstream : public basic_ostream<_CharT, _Traits> { public: typedef _CharT char_type; @@ -827,8 +824,7 @@ // Class template basic_stringstream [stringstream] template -class _LIBCPP_TEMPLATE_VIS basic_stringstream - : public basic_iostream<_CharT, _Traits> +class basic_stringstream : public basic_iostream<_CharT, _Traits> { public: typedef _CharT char_type; diff --git a/libcxx/include/stack b/libcxx/include/stack --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -140,7 +140,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template > class _LIBCPP_TEMPLATE_VIS stack; +template > class stack; template _LIBCPP_INLINE_VISIBILITY @@ -153,7 +153,7 @@ operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y); template */> -class _LIBCPP_TEMPLATE_VIS stack +class stack { public: typedef _Container container_type; @@ -424,10 +424,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> - : public uses_allocator<_Container, _Alloc> -{ -}; +struct uses_allocator, _Alloc> : public uses_allocator<_Container, _Alloc> {}; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/streambuf b/libcxx/include/streambuf --- a/libcxx/include/streambuf +++ b/libcxx/include/streambuf @@ -125,7 +125,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -class _LIBCPP_TEMPLATE_VIS basic_streambuf +class basic_streambuf { public: // types: diff --git a/libcxx/include/thread b/libcxx/include/thread --- a/libcxx/include/thread +++ b/libcxx/include/thread @@ -220,8 +220,7 @@ } template<> -struct _LIBCPP_TEMPLATE_VIS hash<__thread_id> - : public __unary_function<__thread_id, size_t> +struct hash<__thread_id> : public __unary_function<__thread_id, size_t> { _LIBCPP_INLINE_VISIBILITY size_t operator()(__thread_id __v) const _NOEXCEPT @@ -238,7 +237,7 @@ #if _LIBCPP_STD_VER >= 23 template <__fmt_char_type _CharT> -struct _LIBCPP_TEMPLATE_VIS formatter<__thread_id, _CharT> { +struct formatter<__thread_id, _CharT> { public: template _LIBCPP_HIDE_FROM_ABI constexpr typename _ParseContext::iterator parse(_ParseContext& __ctx) { diff --git a/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -571,7 +571,7 @@ } template -class _LIBCPP_TEMPLATE_VIS tuple +class tuple { typedef __tuple_impl::type, _Tp...> _BaseT; @@ -1313,7 +1313,7 @@ }; template <> -class _LIBCPP_TEMPLATE_VIS tuple<> +class tuple<> { public: constexpr tuple() _NOEXCEPT = default; @@ -1794,8 +1794,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> - : true_type {}; +struct uses_allocator, _Alloc> : true_type {}; template template diff --git a/libcxx/include/typeindex b/libcxx/include/typeindex --- a/libcxx/include/typeindex +++ b/libcxx/include/typeindex @@ -60,7 +60,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -class _LIBCPP_TEMPLATE_VIS type_index +class type_index { const type_info* __t_; public: @@ -104,11 +104,10 @@ const char* name() const _NOEXCEPT {return __t_->name();} }; -template struct _LIBCPP_TEMPLATE_VIS hash; +template struct hash; template <> -struct _LIBCPP_TEMPLATE_VIS hash - : public __unary_function +struct hash : public __unary_function { _LIBCPP_INLINE_VISIBILITY size_t operator()(type_index __index) const _NOEXCEPT diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -917,7 +917,7 @@ #endif template -class _LIBCPP_TEMPLATE_VIS __hash_map_iterator +class __hash_map_iterator { _HashIterator __i_; @@ -958,15 +958,15 @@ bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y) {return __x.__i_ != __y.__i_;} - template friend class _LIBCPP_TEMPLATE_VIS unordered_map; - template friend class _LIBCPP_TEMPLATE_VIS unordered_multimap; - template friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator; - template friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator; - template friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator; + template friend class unordered_map; + template friend class unordered_multimap; + template friend class __hash_const_iterator; + template friend class __hash_const_local_iterator; + template friend class __hash_map_const_iterator; }; template -class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator +class __hash_map_const_iterator { _HashIterator __i_; @@ -1012,10 +1012,10 @@ bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y) {return __x.__i_ != __y.__i_;} - template friend class _LIBCPP_TEMPLATE_VIS unordered_map; - template friend class _LIBCPP_TEMPLATE_VIS unordered_multimap; - template friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator; - template friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator; + template friend class unordered_map; + template friend class unordered_multimap; + template friend class __hash_const_iterator; + template friend class __hash_const_local_iterator; }; template @@ -1023,7 +1023,7 @@ template , class _Pred = equal_to<_Key>, class _Alloc = allocator > > -class _LIBCPP_TEMPLATE_VIS unordered_map +class unordered_map { public: // types @@ -1082,9 +1082,9 @@ #endif template - friend class _LIBCPP_TEMPLATE_VIS unordered_map; + friend class unordered_map; template - friend class _LIBCPP_TEMPLATE_VIS unordered_multimap; + friend class unordered_multimap; _LIBCPP_INLINE_VISIBILITY unordered_map() @@ -1916,7 +1916,7 @@ template , class _Pred = equal_to<_Key>, class _Alloc = allocator > > -class _LIBCPP_TEMPLATE_VIS unordered_multimap +class unordered_multimap { public: // types @@ -1973,9 +1973,9 @@ #endif template - friend class _LIBCPP_TEMPLATE_VIS unordered_map; + friend class unordered_map; template - friend class _LIBCPP_TEMPLATE_VIS unordered_multimap; + friend class unordered_multimap; _LIBCPP_INLINE_VISIBILITY unordered_multimap() diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -501,7 +501,7 @@ template , class _Pred = equal_to<_Value>, class _Alloc = allocator<_Value> > -class _LIBCPP_TEMPLATE_VIS unordered_set +class unordered_set { public: // types @@ -541,9 +541,9 @@ #endif template - friend class _LIBCPP_TEMPLATE_VIS unordered_set; + friend class unordered_set; template - friend class _LIBCPP_TEMPLATE_VIS unordered_multiset; + friend class unordered_multiset; _LIBCPP_INLINE_VISIBILITY unordered_set() @@ -1161,7 +1161,7 @@ template , class _Pred = equal_to<_Value>, class _Alloc = allocator<_Value> > -class _LIBCPP_TEMPLATE_VIS unordered_multiset +class unordered_multiset { public: // types @@ -1196,9 +1196,9 @@ #endif template - friend class _LIBCPP_TEMPLATE_VIS unordered_set; + friend class unordered_set; template - friend class _LIBCPP_TEMPLATE_VIS unordered_multiset; + friend class unordered_multiset; _LIBCPP_INLINE_VISIBILITY unordered_multiset() diff --git a/libcxx/include/valarray b/libcxx/include/valarray --- a/libcxx/include/valarray +++ b/libcxx/include/valarray @@ -377,9 +377,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template class _LIBCPP_TEMPLATE_VIS valarray; +template class valarray; -class _LIBCPP_TEMPLATE_VIS slice +class slice { size_t __start_; size_t __size_; @@ -404,11 +404,11 @@ _LIBCPP_INLINE_VISIBILITY size_t stride() const {return __stride_;} }; -template class _LIBCPP_TEMPLATE_VIS slice_array; +template class slice_array; class _LIBCPP_TYPE_VIS gslice; -template class _LIBCPP_TEMPLATE_VIS gslice_array; -template class _LIBCPP_TEMPLATE_VIS mask_array; -template class _LIBCPP_TEMPLATE_VIS indirect_array; +template class gslice_array; +template class mask_array; +template class indirect_array; template _LIBCPP_INLINE_VISIBILITY @@ -717,7 +717,7 @@ size_t size() const {return __size_;} template friend class __val_expr; - template friend class _LIBCPP_TEMPLATE_VIS valarray; + template friend class valarray; }; template @@ -832,7 +832,7 @@ struct __is_val_expr > : true_type {}; template -class _LIBCPP_TEMPLATE_VIS valarray +class valarray { public: typedef _Tp value_type; @@ -1072,12 +1072,12 @@ void resize(size_t __n, value_type __x = value_type()); private: - template friend class _LIBCPP_TEMPLATE_VIS valarray; - template friend class _LIBCPP_TEMPLATE_VIS slice_array; - template friend class _LIBCPP_TEMPLATE_VIS gslice_array; - template friend class _LIBCPP_TEMPLATE_VIS mask_array; + template friend class valarray; + template friend class slice_array; + template friend class gslice_array; + template friend class mask_array; template friend class __mask_expr; - template friend class _LIBCPP_TEMPLATE_VIS indirect_array; + template friend class indirect_array; template friend class __indirect_expr; template friend class __val_expr; @@ -1198,7 +1198,7 @@ // slice_array template -class _LIBCPP_TEMPLATE_VIS slice_array +class slice_array { public: typedef _Tp value_type; @@ -1590,7 +1590,7 @@ // gslice_array template -class _LIBCPP_TEMPLATE_VIS gslice_array +class gslice_array { public: typedef _Tp value_type; @@ -1925,7 +1925,7 @@ // mask_array template -class _LIBCPP_TEMPLATE_VIS mask_array +class mask_array { public: typedef _Tp value_type; @@ -2281,7 +2281,7 @@ // indirect_array template -class _LIBCPP_TEMPLATE_VIS indirect_array +class indirect_array { public: typedef _Tp value_type; @@ -2643,7 +2643,7 @@ size_t size() const {return __1d_.size();} template friend class __val_expr; - template friend class _LIBCPP_TEMPLATE_VIS valarray; + template friend class valarray; }; template diff --git a/libcxx/include/variant b/libcxx/include/variant --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -296,48 +296,48 @@ } template -class _LIBCPP_TEMPLATE_VIS variant; +class variant; template -struct _LIBCPP_TEMPLATE_VIS variant_size; +struct variant_size; template inline constexpr size_t variant_size_v = variant_size<_Tp>::value; template -struct _LIBCPP_TEMPLATE_VIS variant_size : variant_size<_Tp> {}; +struct variant_size : variant_size<_Tp> {}; template -struct _LIBCPP_TEMPLATE_VIS variant_size : variant_size<_Tp> {}; +struct variant_size : variant_size<_Tp> {}; template -struct _LIBCPP_TEMPLATE_VIS variant_size +struct variant_size : variant_size<_Tp> {}; template -struct _LIBCPP_TEMPLATE_VIS variant_size> +struct variant_size> : integral_constant {}; template -struct _LIBCPP_TEMPLATE_VIS variant_alternative; +struct variant_alternative; template using variant_alternative_t = typename variant_alternative<_Ip, _Tp>::type; template -struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const _Tp> +struct variant_alternative<_Ip, const _Tp> : add_const> {}; template -struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, volatile _Tp> +struct variant_alternative<_Ip, volatile _Tp> : add_volatile> {}; template -struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const volatile _Tp> +struct variant_alternative<_Ip, const volatile _Tp> : add_cv> {}; template -struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> { +struct 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...>; }; @@ -367,7 +367,7 @@ constexpr _IndexType __variant_npos = static_cast<_IndexType>(-1); template -class _LIBCPP_TEMPLATE_VIS variant; +class variant; template _LIBCPP_INLINE_VISIBILITY constexpr variant<_Types...>& @@ -736,7 +736,7 @@ } // namespace __visitation template -struct _LIBCPP_TEMPLATE_VIS __alt { +struct __alt { using __value_type = _Tp; template @@ -748,14 +748,14 @@ }; template <_Trait _DestructibleTrait, size_t _Index, class... _Types> -union _LIBCPP_TEMPLATE_VIS __union; +union __union; template <_Trait _DestructibleTrait, size_t _Index> -union _LIBCPP_TEMPLATE_VIS __union<_DestructibleTrait, _Index> {}; +union __union<_DestructibleTrait, _Index> {}; #define _LIBCPP_VARIANT_UNION(destructible_trait, destructor) \ template \ - union _LIBCPP_TEMPLATE_VIS __union { \ @@ -796,7 +796,7 @@ #undef _LIBCPP_VARIANT_UNION template <_Trait _DestructibleTrait, class... _Types> -class _LIBCPP_TEMPLATE_VIS __base { +class __base { public: using __index_t = __variant_index_t; @@ -845,13 +845,11 @@ }; template -class _LIBCPP_TEMPLATE_VIS __dtor; +class __dtor; #define _LIBCPP_VARIANT_DESTRUCTOR(destructible_trait, destructor, destroy) \ template \ - class _LIBCPP_TEMPLATE_VIS __dtor<__traits<_Types...>, \ - destructible_trait> \ - : public __base { \ + class __dtor<__traits<_Types...>, destructible_trait> : public __base { \ using __base_type = __base; \ using __index_t = typename __base_type::__index_t; \ \ @@ -898,7 +896,7 @@ #undef _LIBCPP_VARIANT_DESTRUCTOR template -class _LIBCPP_TEMPLATE_VIS __ctor : public __dtor<_Traits> { +class __ctor : public __dtor<_Traits> { using __base_type = __dtor<_Traits>; public: @@ -933,14 +931,12 @@ }; template -class _LIBCPP_TEMPLATE_VIS __move_constructor; +class __move_constructor; #define _LIBCPP_VARIANT_MOVE_CONSTRUCTOR(move_constructible_trait, \ move_constructor) \ template \ - class _LIBCPP_TEMPLATE_VIS __move_constructor<__traits<_Types...>, \ - move_constructible_trait> \ - : public __ctor<__traits<_Types...>> { \ + class __move_constructor<__traits<_Types...>, move_constructible_trait> : public __ctor<__traits<_Types...>> { \ using __base_type = __ctor<__traits<_Types...>>; \ \ public: \ @@ -973,13 +969,12 @@ #undef _LIBCPP_VARIANT_MOVE_CONSTRUCTOR template -class _LIBCPP_TEMPLATE_VIS __copy_constructor; +class __copy_constructor; #define _LIBCPP_VARIANT_COPY_CONSTRUCTOR(copy_constructible_trait, \ copy_constructor) \ template \ - class _LIBCPP_TEMPLATE_VIS __copy_constructor<__traits<_Types...>, \ - copy_constructible_trait> \ + class __copy_constructor<__traits<_Types...>, copy_constructible_trait> \ : public __move_constructor<__traits<_Types...>> { \ using __base_type = __move_constructor<__traits<_Types...>>; \ \ @@ -1012,7 +1007,7 @@ #undef _LIBCPP_VARIANT_COPY_CONSTRUCTOR template -class _LIBCPP_TEMPLATE_VIS __assignment : public __copy_constructor<_Traits> { +class __assignment : public __copy_constructor<_Traits> { using __base_type = __copy_constructor<_Traits>; public: @@ -1072,13 +1067,12 @@ }; template -class _LIBCPP_TEMPLATE_VIS __move_assignment; +class __move_assignment; #define _LIBCPP_VARIANT_MOVE_ASSIGNMENT(move_assignable_trait, \ move_assignment) \ template \ - class _LIBCPP_TEMPLATE_VIS __move_assignment<__traits<_Types...>, \ - move_assignable_trait> \ + class __move_assignment<__traits<_Types...>, move_assignable_trait> \ : public __assignment<__traits<_Types...>> { \ using __base_type = __assignment<__traits<_Types...>>; \ \ @@ -1113,13 +1107,12 @@ #undef _LIBCPP_VARIANT_MOVE_ASSIGNMENT template -class _LIBCPP_TEMPLATE_VIS __copy_assignment; +class __copy_assignment; #define _LIBCPP_VARIANT_COPY_ASSIGNMENT(copy_assignable_trait, \ copy_assignment) \ template \ - class _LIBCPP_TEMPLATE_VIS __copy_assignment<__traits<_Types...>, \ - copy_assignable_trait> \ + class __copy_assignment<__traits<_Types...>, copy_assignable_trait> \ : public __move_assignment<__traits<_Types...>> { \ using __base_type = __move_assignment<__traits<_Types...>>; \ \ @@ -1152,8 +1145,7 @@ #undef _LIBCPP_VARIANT_COPY_ASSIGNMENT template -class _LIBCPP_TEMPLATE_VIS __impl - : public __copy_assignment<__traits<_Types...>> { +class __impl : public __copy_assignment<__traits<_Types...>> { using __base_type = __copy_assignment<__traits<_Types...>>; public: @@ -1294,7 +1286,7 @@ } // namespace __variant_detail template -class _LIBCPP_TEMPLATE_VIS _LIBCPP_DECLSPEC_EMPTY_BASES variant +class _LIBCPP_DECLSPEC_EMPTY_BASES variant : private __sfinae_ctor_base< __all...>::value, __all...>::value>, @@ -1782,8 +1774,7 @@ { return __lhs.swap(__rhs); } template -struct _LIBCPP_TEMPLATE_VIS hash< - __enable_hash_helper, remove_const_t<_Types>...>> { +struct hash<__enable_hash_helper, remove_const_t<_Types>...>> { using argument_type = variant<_Types...>; using result_type = size_t; diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -380,7 +380,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template */> -class _LIBCPP_TEMPLATE_VIS vector +class vector { private: typedef allocator<_Tp> __default_allocator_type; @@ -2165,7 +2165,7 @@ }; template -class _LIBCPP_TEMPLATE_VIS vector +class vector { public: typedef vector __self; @@ -2650,7 +2650,7 @@ friend class __bit_iterator; friend class __bit_iterator; friend struct __bit_array; - friend struct _LIBCPP_TEMPLATE_VIS hash; + friend struct hash; }; template @@ -3427,8 +3427,7 @@ } template -struct _LIBCPP_TEMPLATE_VIS hash > - : public __unary_function, size_t> +struct hash > : public __unary_function, size_t> { _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 size_t operator()(const vector& __vec) const _NOEXCEPT @@ -3540,7 +3539,7 @@ template // Since is-vector-bool-reference is only used once it's inlined here. requires same_as> -struct _LIBCPP_TEMPLATE_VIS formatter<_Tp, CharT> { +struct formatter<_Tp, CharT> { private: formatter __underlying_; diff --git a/libcxx/src/legacy_debug_handler.cpp b/libcxx/src/legacy_debug_handler.cpp --- a/libcxx/src/legacy_debug_handler.cpp +++ b/libcxx/src/legacy_debug_handler.cpp @@ -17,7 +17,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info { +struct __libcpp_debug_info { _LIBCPP_EXPORTED_FROM_ABI string what() const; const char* __file_; diff --git a/libcxx/utils/data/ignore_format.txt b/libcxx/utils/data/ignore_format.txt --- a/libcxx/utils/data/ignore_format.txt +++ b/libcxx/utils/data/ignore_format.txt @@ -319,7 +319,6 @@ libcxx/include/experimental/type_traits libcxx/include/experimental/unordered_map libcxx/include/experimental/unordered_set -libcxx/include/experimental/utility libcxx/include/ext/__hash libcxx/include/ext/hash_map libcxx/include/ext/hash_set @@ -358,7 +357,6 @@ libcxx/include/__format/formatter_integer.h libcxx/include/__format/formatter_integral.h libcxx/include/__format/formatter_output.h -libcxx/include/__format/formatter_pointer.h libcxx/include/__format/formatter_string.h libcxx/include/__format/parser_std_format_spec.h libcxx/include/__format/unicode.h @@ -642,7 +640,6 @@ libcxx/include/__type_traits/add_volatile.h libcxx/include/__type_traits/aligned_storage.h libcxx/include/__type_traits/aligned_union.h -libcxx/include/__type_traits/alignment_of.h libcxx/include/__type_traits/can_extract_key.h libcxx/include/__type_traits/common_reference.h libcxx/include/__type_traits/common_type.h @@ -652,20 +649,14 @@ libcxx/include/__type_traits/enable_if.h libcxx/include/__type_traits/extent.h libcxx/include/__type_traits/has_unique_object_representation.h -libcxx/include/__type_traits/has_virtual_destructor.h libcxx/include/__type_traits/integral_constant.h libcxx/include/__type_traits/invoke.h -libcxx/include/__type_traits/is_abstract.h -libcxx/include/__type_traits/is_aggregate.h libcxx/include/__type_traits/is_allocator.h libcxx/include/__type_traits/is_always_bitcastable.h -libcxx/include/__type_traits/is_arithmetic.h libcxx/include/__type_traits/is_array.h libcxx/include/__type_traits/is_assignable.h -libcxx/include/__type_traits/is_base_of.h libcxx/include/__type_traits/is_bounded_array.h libcxx/include/__type_traits/is_callable.h -libcxx/include/__type_traits/is_class.h libcxx/include/__type_traits/is_compound.h libcxx/include/__type_traits/is_constant_evaluated.h libcxx/include/__type_traits/is_const.h @@ -674,11 +665,7 @@ libcxx/include/__type_traits/is_copy_assignable.h libcxx/include/__type_traits/is_copy_constructible.h libcxx/include/__type_traits/is_core_convertible.h -libcxx/include/__type_traits/is_default_constructible.h libcxx/include/__type_traits/is_destructible.h -libcxx/include/__type_traits/is_empty.h -libcxx/include/__type_traits/is_enum.h -libcxx/include/__type_traits/is_final.h libcxx/include/__type_traits/is_floating_point.h libcxx/include/__type_traits/is_fundamental.h libcxx/include/__type_traits/is_implicitly_default_constructible.h @@ -688,21 +675,15 @@ libcxx/include/__type_traits/is_member_object_pointer.h libcxx/include/__type_traits/is_member_pointer.h libcxx/include/__type_traits/is_move_assignable.h -libcxx/include/__type_traits/is_move_constructible.h -libcxx/include/__type_traits/is_nothrow_assignable.h libcxx/include/__type_traits/is_nothrow_constructible.h libcxx/include/__type_traits/is_nothrow_convertible.h libcxx/include/__type_traits/is_nothrow_copy_assignable.h -libcxx/include/__type_traits/is_nothrow_copy_constructible.h -libcxx/include/__type_traits/is_nothrow_default_constructible.h libcxx/include/__type_traits/is_nothrow_destructible.h libcxx/include/__type_traits/is_nothrow_move_assignable.h libcxx/include/__type_traits/is_nothrow_move_constructible.h libcxx/include/__type_traits/is_null_pointer.h libcxx/include/__type_traits/is_object.h -libcxx/include/__type_traits/is_pod.h libcxx/include/__type_traits/is_pointer.h -libcxx/include/__type_traits/is_polymorphic.h libcxx/include/__type_traits/is_primary_template.h libcxx/include/__type_traits/is_reference.h libcxx/include/__type_traits/is_reference_wrapper.h @@ -711,18 +692,14 @@ libcxx/include/__type_traits/is_scoped_enum.h libcxx/include/__type_traits/is_signed.h libcxx/include/__type_traits/is_signed_integer.h -libcxx/include/__type_traits/is_standard_layout.h libcxx/include/__type_traits/is_swappable.h -libcxx/include/__type_traits/is_trivial.h libcxx/include/__type_traits/is_trivially_assignable.h -libcxx/include/__type_traits/is_trivially_constructible.h libcxx/include/__type_traits/is_trivially_copyable.h libcxx/include/__type_traits/is_trivially_copy_assignable.h libcxx/include/__type_traits/is_trivially_copy_constructible.h libcxx/include/__type_traits/is_trivially_default_constructible.h libcxx/include/__type_traits/is_trivially_destructible.h libcxx/include/__type_traits/is_unbounded_array.h -libcxx/include/__type_traits/is_union.h libcxx/include/__type_traits/is_unsigned.h libcxx/include/__type_traits/is_unsigned_integer.h libcxx/include/__type_traits/is_valid_expansion.h @@ -738,7 +715,6 @@ libcxx/include/__type_traits/negation.h libcxx/include/__type_traits/noexcept_move_assign_container.h libcxx/include/__type_traits/promote.h -libcxx/include/__type_traits/rank.h libcxx/include/__type_traits/remove_all_extents.h libcxx/include/__type_traits/remove_const.h libcxx/include/__type_traits/remove_cv.h