Page MenuHomePhabricator

[libc++] Implements concept default_initializable.

Authored by Mordante on Dec 17 2020, 8:16 AM.




  • LWG3149 DefaultConstructible should require default initialization

Implements parts of:

  • P0898R3 Standard Library Concepts
  • P1754 Rename concepts to standard_case for C++20, while we still can

Depends on D91986

Diff Detail

Event Timeline

Mordante requested review of this revision.Dec 17 2020, 8:16 AM
Mordante created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2020, 8:16 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante added inline comments.Jan 23 2021, 10:55 AM

Remove this test. During the review of D91986 is turned out this deprecated feature is no longer valid in C++20.

cjdb added a comment.Jan 23 2021, 11:23 AM

Will give a more thorough review next week, but a quick weekend one LGTM.

ldionne requested changes to this revision.Jan 28 2021, 10:58 AM

This LGTM except for the nitpick.


These implementation details of libc++ shouldn't be tested here, or if they are, then we should use LIBCPP_STATIC_ASSERT (which expands to nothing when testing a non-libc++ library).

This revision now requires changes to proceed.Jan 28 2021, 10:58 AM
Mordante marked an inline comment as done.Jan 28 2021, 11:52 AM
Mordante added inline comments.

I'll use the LIBCPP_STATIC_ASSERT since during debugging the code it was good to see whether the expected test failed.

Mordante updated this revision to Diff 319935.Jan 28 2021, 12:01 PM
Mordante marked an inline comment as done.
Mordante edited the summary of this revision. (Show Details)
  • Removed the throw()
  • Target libc++ release 13 instead of 12
  • Changed internal tests to use LIBCPP_STATIC_ASSERT
  • rebased
ldionne accepted this revision.Jan 28 2021, 12:41 PM

Ship it once CI is done! Thanks!

This revision is now accepted and ready to land.Jan 28 2021, 12:41 PM
Mordante updated this revision to Diff 320487.Mon, Feb 1, 8:45 AM

Rebase to trigger CI.

This revision was landed with ongoing or failed builds.Mon, Feb 1, 10:13 AM
This revision was automatically updated to reflect the committed changes.