C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Possible deprecation of -> operator

From: Andrey Semashev <andrey.semashev_at_[hidden]>
Date: Fri, 31 Jan 2025 14:54:05 +0300
On 1/31/25 13:22, Filip via Std-Proposals wrote:
> Hi everyone,
>
> 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.

Operators . and -> have distinct meanings for smart pointers and
iterators. I don't see how they can be unified.

Received on 2025-01-31 11:54:09