https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58876
--- Comment #9 from Matthew Woehlke <mw_triad at users dot sourceforge.net> --- (In reply to Jonathan Wakely from comment #8) > No, really, that's not how make_unique works. You do not use 'new' with > make_unique, that's the whole point [...] D'oh, sorry :-). Not sure what I was thinking. I think I meant 'unique_ptr<A>(new B)', like to the original example. That said... > unique_ptr<A> p = make_unique<B>(); ...this is also a good example that I would like to see warn. (I think this has the same problems; the warning would need to trigger in the conversion operator, otherwise the knowledge of the true type is lost by the time the unique_ptr<A> is destroyed.)