C++ Logo

std-proposals

Advanced search

Re: Proposal - Allow '.' operator to work on pointers (again sortof)

From: Jake Arkinstall <jake.arkinstall_at_[hidden]>
Date: Thu, 5 Mar 2020 12:46:22 +0000
On Thu, Mar 5, 2020 at 12:35 PM J Decker via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> again, that is not a *(pointer), that is an instance of a class, aka an
> object. '.' remains working on objects exactly the same. and C++20
> removing .unique() will fail. there's no pointer to perform indirection on.
>

Smart pointers are designed to act as a *better replacement* for pointers,
and the unified access syntax removes barriers. There isn't a whelk's
chance in a supernova that the committee wouldn't insist that a new way of
dereferencing pointers be carried out with smart pointers too - and if the
latter isn't feasible, the former won't be perceived to be either.

Received on 2020-03-05 06:49:17