Opened 8 years ago

#11093 new Tasks

Limitations of unique_ptr in C++03 mode

Reported by: Adam Romanek <romanek.adam@…> Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: move
Version: Boost 1.57.0 Severity: Problem
Keywords: unique_ptr, move, emulation Cc:

Description

This is a follow-up of a thread on boost-dev mailing list which touches the topic of boost::movelib::unique_ptr emulation in C++03.

One of such limitations is related to copy initialization expressions:

unique_ptr<Derived> x = make_unique<Derived>();
unique_ptr<Base> y = move(x);

which won't compile, while:

unique_ptr<Derived> x = make_unique<Derived>();
unique_ptr<Base> y(move(x));

will compile without any problems.

There are probably some other limitations. It would be best if they were documented.

Change History (0)

Note: See TracTickets for help on using tickets.