Skip to content

Commit

Permalink
[libc++] Remove unneeded qualifier.
Browse files Browse the repository at this point in the history
In D117811 @Quuxplusone pointed out the friend declarations don't need
to be qualified. Removing the qualification should avoid needing to add
a GCC work-around when changing _VSTD to std.

Reviewed By: Quuxplusone, philnik, #libc, ldionne

Differential Revision: https://reviews.llvm.org/D118719
  • Loading branch information
mordante authored and ldionne committed Feb 1, 2022
1 parent 9477a30 commit d7c4072
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 3 additions & 4 deletions libcxx/include/__format/format_arg.h
Expand Up @@ -140,13 +140,12 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_arg {
// shall be well-formed when treated as an unevaluated operand.

template <class _Ctx, class... _Args>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_AVAILABILITY_FORMAT friend __format_arg_store<_Ctx, _Args...>
_VSTD::make_format_args(const _Args&...);
_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT friend __format_arg_store<_Ctx, _Args...>
make_format_args(const _Args&...);

template <class _Visitor, class _Ctx>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT friend decltype(auto)
_VSTD::visit_format_arg(_Visitor&& __vis, basic_format_arg<_Ctx> __arg);
visit_format_arg(_Visitor&& __vis, basic_format_arg<_Ctx> __arg);

union {
bool __boolean;
Expand Down
8 changes: 3 additions & 5 deletions libcxx/include/__format/format_context.h
Expand Up @@ -132,9 +132,8 @@ class

template <class __OutIt, class __CharT>
friend _LIBCPP_HIDE_FROM_ABI basic_format_context<__OutIt, __CharT>
_VSTD::__format_context_create(
__OutIt, basic_format_args<basic_format_context<__OutIt, __CharT>>,
optional<_VSTD::locale>&&);
__format_context_create(__OutIt, basic_format_args<basic_format_context<__OutIt, __CharT>>,
optional<_VSTD::locale>&&);

// Note: the Standard doesn't specify the required constructors.
_LIBCPP_HIDE_FROM_ABI
Expand All @@ -146,8 +145,7 @@ class
#else
template <class __OutIt, class __CharT>
friend _LIBCPP_HIDE_FROM_ABI basic_format_context<__OutIt, __CharT>
_VSTD::__format_context_create(
__OutIt, basic_format_args<basic_format_context<__OutIt, __CharT>>);
__format_context_create(__OutIt, basic_format_args<basic_format_context<__OutIt, __CharT>>);

_LIBCPP_HIDE_FROM_ABI
explicit basic_format_context(_OutIt __out_it,
Expand Down

0 comments on commit d7c4072

Please sign in to comment.