On Mon, Jun 26, 2023, 08:30 Frederick Virchanza Gotham via Std-Proposals wrote:
Personally I like the idea of having '^^' as a unary operator that
works as either 'move' or 'forward'

I also like the idea of a move operator. But would much prefer something like:

auto ptr := std::unique_ptr<int>(new int(1));

or

auto ptr <<- std::unique_ptr<int>(new int(2));

Otherwise && would be perfect as it is inline with the function declaration.

auto ptr = &&std::unique_ptr<int>(new int(3));

Am Mo., 26. Juni 2023 um 08:30 Uhr schrieb Frederick Virchanza Gotham via Std-Proposals <std-proposals@lists.isocpp.org>:
> On Wed, Jun 21, 2023 at 5:24 PM Михаил Найденов wrote:
> >
> > Proposed is to have a postscript operator &&, which either moves or forwards.


Personally I like the idea of having '^^' as a unary operator that
works as either 'move' or 'forward':

template<class T>
void Func(T &&arg)
{
    static T obj;
    obj = ^^arg;
}
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals