Date: Fri, 29 Apr 2022 17:26:33 +0200
Ah, I should have done my homework before. Awesome, thank you Barry!
Best regards,
Kilian
Am 29.04.2022 um 17:17 schrieb Barry Revzin:
>
>
> On Fri, Apr 29, 2022 at 10:09 AM Kilian Henneberger via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>
> Hello everyone,
>
> has anyone proposed additions to std::pair/std::tuple for C++26
> yet? 😛
> While writing unit tests for zip_view and zip_transform_view, I
> realized
> that you could not compare a pair<T, U> with a tuple<T, U>.
> What is your opinion about adding comparison operators between pair<T,
> U> and tuple<T, U>?
> Something like:
>
> template <class T, class U>
> constexpr bool operator==(const pair<T, U>& lhs, const tuple<T,
> U>& rhs);
>
> template <class T, class U>
> constexpr /*some comparison category*/ operator<=>(const pair<T, U>&
> lhs, const tuple<T, U>& rhs);
>
> Best regards,
> Kilian
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2165r3.pdf
>
> Barry
Best regards,
Kilian
Am 29.04.2022 um 17:17 schrieb Barry Revzin:
>
>
> On Fri, Apr 29, 2022 at 10:09 AM Kilian Henneberger via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
>
> Hello everyone,
>
> has anyone proposed additions to std::pair/std::tuple for C++26
> yet? 😛
> While writing unit tests for zip_view and zip_transform_view, I
> realized
> that you could not compare a pair<T, U> with a tuple<T, U>.
> What is your opinion about adding comparison operators between pair<T,
> U> and tuple<T, U>?
> Something like:
>
> template <class T, class U>
> constexpr bool operator==(const pair<T, U>& lhs, const tuple<T,
> U>& rhs);
>
> template <class T, class U>
> constexpr /*some comparison category*/ operator<=>(const pair<T, U>&
> lhs, const tuple<T, U>& rhs);
>
> Best regards,
> Kilian
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2165r3.pdf
>
> Barry
Received on 2022-04-29 15:26:34