C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Manifold comparison operator

From: Fabio Alemagna <falemagn_at_[hidden]>
Date: Tue, 26 Sep 2023 12:29:35 +0200
Il giorno mar 26 set 2023 alle ore 11:13 Bjorn Reese
<breese_at_[hidden]> ha scritto:
>
> On 9/24/23 16:05, Fabio Alemagna via Std-Proposals wrote:
>
> > It seems to be working fine, but comments and corrections are greatly welcome.
>
> Here is a simplification that uses std::apply:
>
> https://godbolt.org/z/9bn4jn5v7

That looks indeed neater at some levels, but you did away with the
type check, which renders the construct not able to deal with a
heterogeneous set of value types any longer.

However, meanwhile I came up with a revised version that uses policies
and free functions rather than subclasses, to achieve the same syntax
but with a leaner and more composable implementation.

https://godbolt.org/z/4Wv7rq4se

Received on 2023-09-26 10:29:48