This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Follow LWG 2520 "N4089 broke initializing unique_ptr<T[]> from a nullptr".
ClosedPublic

Authored by STL_MSFT on Jul 5 2016, 1:49 PM.

Details

Summary

Follow LWG 2520 "N4089 broke initializing unique_ptr<T[]> from a nullptr".

This library issue permits nullptr, but not 0 or NULL (which can be 0). In null_ctor.pass.cpp, replace 0 with nullptr. In pointer_deleter01.pass.cpp, which is testing both NULL and nullptr, mark the NULL test as libcxx-specific.

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 62785.Jul 5 2016, 1:49 PM
STL_MSFT retitled this revision from to [libcxx] [test] Follow LWG 2520 "N4089 broke initializing unique_ptr<T[]> from a nullptr"..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
EricWF accepted this revision.Jul 24 2016, 4:53 PM
EricWF edited edge metadata.

I see how the wording doesn't require supporting the literal '0', but if you provide a concrete 'std::nullptr_t' parameter your going to allow the conversion from '0'. I think this should probably be clarified in the standard. However I'm fine taking this for now.

This revision is now accepted and ready to land.Jul 24 2016, 4:53 PM
EricWF closed this revision.Jul 24 2016, 4:56 PM

r276587.