Date: Fri, 31 Jan 2025 08:29:17 -0800
On Friday 31 January 2025 02:22:59 Pacific Standard Time Filip via Std-
Proposals wrote:
> I’m wondering about the possibility of removal or deprecation of -> operator
> in favor of automatic dereference by ‘.’
>
> If I remember correctly in tcc, compiler has a single if to check if they
> are used correctly and could automatically use the correct operation.
>
> Are there any good reasons to keep that syntax?
> In my experience it’s just an annoying part of early c that is maintained.
What do you suggest we use for smart pointers and std::optional instead of it?
optional->content();
uniqueptr->fn();
smartptr->uniqueptr->optional->whatever();
Proposals wrote:
> I’m wondering about the possibility of removal or deprecation of -> operator
> in favor of automatic dereference by ‘.’
>
> If I remember correctly in tcc, compiler has a single if to check if they
> are used correctly and could automatically use the correct operation.
>
> Are there any good reasons to keep that syntax?
> In my experience it’s just an annoying part of early c that is maintained.
What do you suggest we use for smart pointers and std::optional instead of it?
optional->content();
uniqueptr->fn();
smartptr->uniqueptr->optional->whatever();
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel DCAI Platform & System Engineering
Received on 2025-01-31 16:29:22