On Saturday, 27 May 2017 at 18:33:36 UTC, Ola Fosheim Grøstad
wrote:
On Saturday, 27 May 2017 at 18:21:41 UTC, Moritz Maxeiner wrote:
Then please don't call them "smart", because that term is
specifically reserved for something that adds at least some
additional features over a regular pointer (bounds checking,
memory / lifetime management, etc.).
"smart pointer" just means that it is a pointer wrapped in an
ADT. In this context it could provide allocation-information
would be one thing it could provide, or reference counting,
member access or whatever. The "smart" part was deliberately
left unspecified.
An ADT that adds features to the wrapped pointer; and if it adds
features, it is not *just* a normal pointer anymore, i.e. you
cannot use it as a verbatim replacement for normal class
instances on the language level, because you change their
semantics.