C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Automatic perfect forwarding is possible and not too complicated

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Sat, 12 Apr 2025 18:00:58 +0100
On Sat, 12 Apr 2025 at 17:15, Frederick Virchanza Gotham via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> If you're going to use a string_view to refer to the contents of an
> std::string, then you already need to make sure that the string doesn't
> change too much. So you wouldn't use a trigraph '&&&' reference to refer
> to a string if either:
> a) You've already stored the value of c_str()
> b) You're going to plunder the string's resources
>

The fact you don't have a better name for it than "trigraph reference" is
telling.

I can imagine the conversations now:
"So what is this ugly &&& thing?"
"It's a trigraph reference"
"erm, ok ... so what does it do?"
"it's a qualifier composed of three characters."
"ok, but what does it mean?"
"it's like && but 50% more."

Received on 2025-04-12 17:01:16