He mentioned prvalues, which would nonsense, but once you read the proposal it looks more like a functor, you write it as if you would call a functor but the call only happens inside the function.

It is not good as it begs the question if what you are passing in is a functor, why don't you write it that way instead of creating a new syntax.

Which ultimately is what everything boils down to, everything can just be simplified with an interface that does the call explicitly instead of playing value semantics.


From: Std-Proposals <std-proposals-bounces@lists.isocpp.org> on behalf of Thiago Macieira via Std-Proposals <std-proposals@lists.isocpp.org>
Sent: Friday, May 31, 2024 4:12:18 PM
To: std-proposals@lists.isocpp.org <std-proposals@lists.isocpp.org>
Cc: Thiago Macieira <thiago@macieira.org>
Subject: Re: [std-proposals] std::elide

On Friday 31 May 2024 09:31:29 GMT-3 Frederick Virchanza Gotham via Std-
Proposals wrote:
> Well it wouldn't be Friday if I didn't write a new paper so here goes:
>
>     http://www.virjacode.com/papers/prvalue_params.htm

A prvalue is a special type of rvalue. What you're saying is that rvalue-ref
functions can only accept xvalues but not prvalues, though that's patently
false.

void f(int &&);
void f()
{
    f(3);
}

3 is a prvalue and is accepted.

Given that your introduction section contains such a blatant absurdity, either
your paper is entirely wrong or you're using wrong terms to mean what you want
to mean. I didn't read the rest.

I did notice you're still using std::mutex in your examples, though. STOP
DOING THAT. Anyone reading the paper will again go into the discussion of how
returning a mutex is pointless. Find another, real type that is immovable but
makes sense to return.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Fleet Engineering and Quality



--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals