[libcxx-commits] [libcxx] [libc++] P3379R1: Constrain `std::expected` equality operators (PR #117664)
Xiaoyang Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 27 23:02:55 PST 2024
================
@@ -1139,7 +1140,11 @@ class expected : private __expected_base<_Tp, _Err> {
// [expected.object.eq], equality operators
template <class _T2, class _E2>
- requires(!is_void_v<_T2>)
+ requires(!is_void_v<_T2> &&
+ requires(const _Tp& __tp, const _T2& __t2, const _Err& __err, const _E2& __e2) {
+ { __tp == __t2 } -> convertible_to<bool>;
----------------
xiaoyang-sde wrote:
Would you like to draft a patch for this header if you have time? I can rebase and use your header. This will ensure that you receive credit for your work! Otherwise, I can include it in this patch myself.
https://github.com/llvm/llvm-project/pull/117664
More information about the libcxx-commits
mailing list