C++ Logo

std-proposals

Advanced search

New way to declare smart pointers

From: Aymeric Pellé <aymeric.pelle_at_[hidden]>
Date: Wed, 23 Oct 2019 14:29:45 +0200
Hello,

This proposal aims to ease the basic use of smart pointers.

The following declarations:

T*s ptr;
T*u ptr;
T*w ptr;

would be equivalent to this ones:

std::shared_ptr<T> ptr;
std::unique_ptr<T> ptr;
std::weak_ptr<T> ptr;

What do you think about it?

Regards,
Aymeric Pellé

Received on 2019-10-23 07:32:12