Date: Thu, 22 Jun 2023 09:39:52 +0300
It seems that this proposal introduces a new parsing ambiguity:
`name(name&&)` can now mean either a function type: `type(type&&)` or a function call with a forwarded parameter. The trickiest problem for C++ parsers is that if you see `name` you generally don't know if it's a type or a value so you have to do semantic analysis to disambiguate those cases and parse the code correctly.
Given the above, I would recommend to consult with compiler implementers and get confirmation that this proposal does not present implementation problems for C++ parsers, before pursuing this idea further.
Cheers,
Timur
> On 21 Jun 2023, at 19:24, Михаил Найденов via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> Hello,
> I am resurrecting another old (2018) proposal of mine, I never submitted.
>
> Proposed is to have a postscript operator &&, which either moves or forwards.
>
> Thank You
> <UniformForwardAndMove.html>--
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
`name(name&&)` can now mean either a function type: `type(type&&)` or a function call with a forwarded parameter. The trickiest problem for C++ parsers is that if you see `name` you generally don't know if it's a type or a value so you have to do semantic analysis to disambiguate those cases and parse the code correctly.
Given the above, I would recommend to consult with compiler implementers and get confirmation that this proposal does not present implementation problems for C++ parsers, before pursuing this idea further.
Cheers,
Timur
> On 21 Jun 2023, at 19:24, Михаил Найденов via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> Hello,
> I am resurrecting another old (2018) proposal of mine, I never submitted.
>
> Proposed is to have a postscript operator &&, which either moves or forwards.
>
> Thank You
> <UniformForwardAndMove.html>--
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2023-06-22 06:39:56