C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Manifold comparison operator

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Mon, 25 Sep 2023 00:43:01 +0300
On Mon, 25 Sept 2023 at 00:39, Fabio Alemagna via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> 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.

Yes, I noticed it, and understood it, I should've asked why it's not
_always_ using a tuple
of references.. ..but now that I said that, I realize that you can't
lifetime-extend into a tuple.

> > 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.

Who.. ..is "you"?

Received on 2023-09-24 21:43:14