C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Manifold comparison operator

From: Fabio Alemagna <falemagn_at_[hidden]>
Date: Sun, 24 Sep 2023 23:39:12 +0200
Il giorno dom 24 set 2023 alle ore 16:26 Ville Voutilainen
<ville.voutilainen_at_[hidden]> ha scritto:
> Beaufiful. But why isn't it using a tuple of references?

So that any temporaries are copied, to avoid dangling references in
case the class is not instantiated as a temporary.

Lvalues are stored as references, though: notice the template deduction guide.

> Well.. I'm sure there's lots of useful tuple algorithms, but maybe
> they should remain
> in Boost::Hana, separate from the standard library.

I was under the impression you wanted this functionality to be
incorporated in the standard. You proposed new operators, but the
functionality can be implemented totally in terms of the library at no
overhead, as far as I can tell.

I took the liberty to implement the other quantifiers and relational
operators. See on godbolt: https://godbolt.org/z/5oor5vnYs

Fabio

Received on 2023-09-24 21:39:25