Your code is a good example of both abuse of new (the object should not be allocated dynamically to begin with) and abuse of auto: if there was a valid motivation for using new and unique_ptr, something like std::unique_ptr<A> a( new A ); (or std::unique_ptr<A> a{ new A };) would be far preferable.