Le 07/06/2016 16:32, Jean-Marc Lasgouttes a écrit :
Le 07/06/2016 à 17:25, Guillaume Munch a écrit :
Technically, unique_ptr.h is also useful to include <memory>. When you
start using unique_ptr, you expect that you might use make_unique at
some point, so you want to just include a generic header.

I'd rather include only the standard headers to obtain unique_ptr, and
then include support/make_unique.h when we explicitly need it.


When you have unique_ptr, you also want to have make_unique without
hassle. The reason is that apart from some corner cases, make_unique is
never really necessary, more of a convenience. So I prefer to have
unique_ptr.h open unique_ptr in the lyx namespace for me and only have
to include one header. But, you are always free to just include <memory>.

Reply via email to