This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Constrain unique_ptr::operator=(unique_ptr<Tp, Dp>) in C++03 mode
ClosedPublic

Authored by EricWF on Aug 19 2015, 3:50 PM.

Details

Summary

This patch properly constrains the converting assignment operator in C++03. It also fixes a bug where std::forward was given the wrong type.
The following two tests begin passing in C++03:

  • unique_ptr.single.asgn/move_convert.pass.cpp
  • unique_ptr.single.asgn/move_convert13.fail.cpp

Diff Detail

Event Timeline

EricWF updated this revision to Diff 32629.Aug 19 2015, 3:50 PM
EricWF updated this revision to Diff 32631.
EricWF retitled this revision from to [libcxx] Constrain unique_ptr::operator=(unique_ptr<Tp, Dp>) in C++03 mode.
EricWF updated this object.
EricWF added a reviewer: mclow.lists.
EricWF added a subscriber: cfe-commits.

Update diff so it has more context.

mclow.lists accepted this revision.Aug 27 2015, 10:02 PM
mclow.lists edited edge metadata.

This is just making the two halves of the #ifdef consistent. LGTM.

This revision is now accepted and ready to land.Aug 27 2015, 10:02 PM
EricWF closed this revision.Aug 27 2015, 10:08 PM