[libc++][cmp][NFC] Fix: Empty namespaces should be avoided (#210624)

Context: Including `<__utility/cmp.h>` causes:

> cmp.h:25:1: error: Empty namespaces should be avoided. Move any checks
around the namespace instead.
[libcpp-avoid-empty-namespaces,-warnings-as-errors]
This commit is contained in:
Hristo Hristov 2026-07-20 05:47:58 +03:00 committed by GitHub
parent 5497f466e4
commit 53c6ce165a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,10 +22,10 @@
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
_LIBCPP_BEGIN_NAMESPACE_STD
template <typename _Tp, typename _Ip>
concept __comparison_can_promote_to =
sizeof(_Tp) < sizeof(_Ip) || (sizeof(_Tp) == sizeof(_Ip) && __signed_integer<_Tp>);
@ -84,10 +84,10 @@ template <__signed_or_unsigned_integer _Tp, __signed_or_unsigned_integer _Up>
std::cmp_greater_equal(__u, numeric_limits<_Tp>::min());
}
#endif // _LIBCPP_STD_VER >= 20
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_STD_VER >= 20
_LIBCPP_POP_MACROS
#endif // _LIBCPP___UTILITY_CMP_H