Proposing switch -fsmart-pointers
Ian Lance Taylor
iant@google.com
Fri Oct 5 16:39:00 GMT 2012
On Fri, Oct 5, 2012 at 9:08 AM, _ <neuralll@gmail.com> wrote:
>
> I thing it would be best to implement it as compiller switch -fsmart-pointers
> not requiring scope object and derive statement for objects. ie we
> need equal flexibility and freedom like have today with static objects
Experience shows us that programmers want several different types of
smart pointers in practice. I don't see any reason to enshrine a
particular variant in the compiler. Particularly when C++ already
supports smart pointers.
(For example, your variant of smart pointers doesn't seem to help with
pointers in struct fields, when those structs are stored in the heap.)
Ian
More information about the Gcc
mailing list