[libcxx-commits] [libcxx] WIP - [libc++][functional] P2944R3 (partial): Comparisons for ``reference_wrapper`` (``reference_wrapper`` operators only) (PR #88384)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 18 22:50:49 PDT 2024
================
@@ -64,6 +67,46 @@ class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp> {
{
return std::__invoke(get(), std::forward<_ArgTypes>(__args)...);
}
+
+#if _LIBCPP_STD_VER >= 26
+
+ // [refwrap.comparisons], comparisons
+
+ friend constexpr bool operator==(reference_wrapper __x, reference_wrapper __y) {
+ static_assert(is_convertible_v<decltype(__x.get() == __y.get()), bool>);
----------------
H-G-Hristov wrote:
That's correct! Thanks!
https://github.com/llvm/llvm-project/pull/88384
More information about the libcxx-commits
mailing list