El 23/08/2014 23:47, Adam Wulkiewicz escribió:
AFAIS this is in line with the Boost.SmartPtr library, e.g. shared_ptr and make_shared aren't included together, correct me if I'm wrong. The difference is that make_shared doesn't emulate variadic templates using Boost.PP. And there is an implementation of boost::make_unique returning std::unique_ptr<> so I'm guessing that there may be a problem with backward compatibility.
<nod> I didn't notice that. An alternative to maintain backwards compatibility is to change header and function names. But I noticed those headers are from January 2014, released only in Boost 1.56. I doubt the change will break much user code. If backwards compatibility is not required we could somehow try to inform users that they should not use it and replace it in Boost 1.57. That's something we should decide ASAP. And release Boost 1.57 ASAP too ;-) In any case I think some functions from current make_unique.hpp, like "make_unique_noinit", can be useful, specially when allocating big memory buffers of POD types users don't need to value initialize. Best, Ion