Le 08/05/2015 23:10, Georg Baum a écrit :
I have many places like in the patch below. Is there a reason why I
should keep the auto_ptr instead of a naked pointer? What is it good for?
Usually it is used for exception safety: If you use a raw pointer, you need
to delete it in the catch clause, e
On 09/05/2015 11:37, Jean-Marc Lasgouttes wrote:
Le 09/05/2015 09:18, Abdelrazak Younes a écrit :
On 08/05/2015 22:13, Jean-Marc Lasgouttes wrote:
With C++11, auto_ptr is deprecated and we get warnings.
I am trying to see how we can get rid of it. unique_ptr is new to
C++11, so I'd rather avoi
Le 09/05/2015 09:18, Abdelrazak Younes a écrit :
On 08/05/2015 22:13, Jean-Marc Lasgouttes wrote:
With C++11, auto_ptr is deprecated and we get warnings.
I am trying to see how we can get rid of it. unique_ptr is new to
C++11, so I'd rather avoid that.
Why that?
unique_ptr is supported since
On 08/05/2015 22:13, Jean-Marc Lasgouttes wrote:
With C++11, auto_ptr is deprecated and we get warnings.
I am trying to see how we can get rid of it. unique_ptr is new to
C++11, so I'd rather avoid that.
Why that?
unique_ptr is supported since gcc 4.4 released in 2009:
https://gcc.gnu.org/gc
Jean-Marc Lasgouttes wrote:
> With C++11, auto_ptr is deprecated and we get warnings.
>
> I am trying to see how we can get rid of it. unique_ptr is new to C++11,
> so I'd rather avoid that.
Why not use unique_ptr fpr C++11 and auto_ptr else? The difference is in the
copying semantics, which do
With C++11, auto_ptr is deprecated and we get warnings.
I am trying to see how we can get rid of it. unique_ptr is new to C++11,
so I'd rather avoid that.
I have many places like in the patch below. Is there a reason why I
should keep the auto_ptr instead of a naked pointer? What is it good f