C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] Allow '.' to behave like '->' where it is currently an error

From: Florian Weimer <fweimer_at_[hidden]>
Date: Fri, 28 Feb 2020 11:24:29 +0100
* J. Decker via Liaison:

> that behavior does not generate an error; and it was mentioned all the
> other `_ptr` types (unique_ptr) being part of that.

The problem is that with the proposal, it becomes a clearly
backwards-incompatible change to add any (maybe even private) member to
smart pointer classes such as std::unique_ptr. I'm not sure if that
is what we want.

I think it would possible to add new functionality to smart pointer
classes using argument-dependent lookup instead of member functions,
so there is a way out.

Thanks,
Florian

Received on 2020-02-28 04:27:20