This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Don't ask whether Incomplete& can be assigned to.
ClosedPublic

Authored by STL_MSFT on Jan 11 2017, 7:03 PM.

Details

Summary

[libcxx] [test] Don't ask whether Incomplete& can be assigned to.

This is the subject of an active NB comment. Regardless of what the Working
Paper currently says, asking this question is morally wrong, because the
answer can change when the type is completed. C1XX now detects such
precondition violations and complains about them; perhaps Clang should too.

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 84066.Jan 11 2017, 7:03 PM
STL_MSFT retitled this revision from to [libcxx] [test] Don't ask whether Incomplete& can be assigned to..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
EricWF accepted this revision.Jan 13 2017, 7:40 PM
EricWF edited edge metadata.

LGTM.

Although is_assignable can often get accidentally instantiated with an incomplete type by way of std::tuple<Incomplete&> or similar, which is the rational for this test case.

This revision is now accepted and ready to land.Jan 13 2017, 7:40 PM
STL_MSFT closed this revision.Jan 17 2017, 2:37 PM