[Mesa-dev] [PATCH v2 1/3] nouveau: Fix gcc6 / c++11 auto_ptr deprecation compiler warnings

Ilia Mirkin imirkin at alum.mit.edu
Wed Jun 29 13:27:55 UTC 2016


For those of us who are lazy and forgetful (i.e. me), can you remind
the difference between auto_ptr and unique_ptr? IIRC unique_ptr is
more like scoped_ptr, while auto_ptr has transfer semantics?

On Wed, Jun 29, 2016 at 8:38 AM, Hans de Goede <hdegoede at redhat.com> wrote:
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_util.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_util.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_util.h
> index 7b0de85..c619499 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_util.h
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_util.h
> @@ -94,7 +94,11 @@ public:
>     virtual void reset() { assert(0); } // only for graph iterators
>  };
>
> +#if __cplusplus >= 201103L
> +typedef std::unique_ptr<Iterator> IteratorRef;
> +#else
>  typedef std::auto_ptr<Iterator> IteratorRef;
> +#endif
>
>  class ManipIterator : public Iterator
>  {
> --
> 2.7.4
>


More information about the mesa-dev mailing list