diff options
Diffstat (limited to 'libcxx/include/__format/format_context.h')
| -rw-r--r-- | libcxx/include/__format/format_context.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h index 85e00eb222cf..9d50cee2483f 100644 --- a/libcxx/include/__format/format_context.h +++ b/libcxx/include/__format/format_context.h @@ -37,11 +37,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER > 17 +#if _LIBCPP_STD_VER >= 20 template <class _OutIt, class _CharT> requires output_iterator<_OutIt, const _CharT&> -class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_context; +class _LIBCPP_TEMPLATE_VIS basic_format_context; #ifndef _LIBCPP_HAS_NO_LOCALIZATION /** @@ -80,7 +80,6 @@ requires output_iterator<_OutIt, const _CharT&> class // clang-format off _LIBCPP_TEMPLATE_VIS - _LIBCPP_AVAILABILITY_FORMAT _LIBCPP_PREFERRED_NAME(format_context) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wformat_context)) // clang-format on @@ -121,9 +120,9 @@ private: // TODO FMT Validate whether lazy creation is the best solution. optional<_VSTD::locale> __loc_; - template <class __OutIt, class __CharT> - friend _LIBCPP_HIDE_FROM_ABI basic_format_context<__OutIt, __CharT> - __format_context_create(__OutIt, basic_format_args<basic_format_context<__OutIt, __CharT>>, + template <class _OtherOutIt, class _OtherCharT> + friend _LIBCPP_HIDE_FROM_ABI basic_format_context<_OtherOutIt, _OtherCharT> + __format_context_create(_OtherOutIt, basic_format_args<basic_format_context<_OtherOutIt, _OtherCharT>>, optional<_VSTD::locale>&&); // Note: the Standard doesn't specify the required constructors. @@ -134,9 +133,9 @@ private: : __out_it_(_VSTD::move(__out_it)), __args_(__args), __loc_(_VSTD::move(__loc)) {} #else - template <class __OutIt, class __CharT> - friend _LIBCPP_HIDE_FROM_ABI basic_format_context<__OutIt, __CharT> - __format_context_create(__OutIt, basic_format_args<basic_format_context<__OutIt, __CharT>>); + template <class _OtherOutIt, class _OtherCharT> + friend _LIBCPP_HIDE_FROM_ABI basic_format_context<_OtherOutIt, _OtherCharT> + __format_context_create(_OtherOutIt, basic_format_args<basic_format_context<_OtherOutIt, _OtherCharT>>); _LIBCPP_HIDE_FROM_ABI explicit basic_format_context(_OutIt __out_it, @@ -162,7 +161,7 @@ private: // Here the width of an element in input is determined dynamically. // Note when the top-level element has no width the retargeting is not needed. template <class _CharT> -class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT +class _LIBCPP_TEMPLATE_VIS basic_format_context<typename __format::__retarget_buffer<_CharT>::__iterator, _CharT> { public: using iterator = typename __format::__retarget_buffer<_CharT>::__iterator; @@ -216,7 +215,7 @@ private: }; _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_format_context); -#endif //_LIBCPP_STD_VER > 17 +#endif //_LIBCPP_STD_VER >= 20 _LIBCPP_END_NAMESPACE_STD |
