Page MenuHomePhabricator

Add default initialization to compressed_pair.
ClosedPublic

Authored by mvels on Nov 22 2019, 1:58 PM.

Details

Summary

This change introduces the __default_init_tag to memory, and a corresponding element constructor to allow for default initialization of either of the pair values. This is useful for classes such as std::string where most (all) constructors explitly initialize the values in the constructor.

Event Timeline

mvels created this revision.Nov 22 2019, 1:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 22 2019, 1:58 PM
mvels added a comment.Dec 4 2019, 2:42 PM

Friendly ping?

EricWF accepted this revision.Dec 12 2019, 11:37 AM
This revision is now accepted and ready to land.Dec 12 2019, 11:37 AM
EricWF added inline comments.Dec 12 2019, 11:38 AM
libcxx/test/std/memory/compressed_pair/compressed_pair.pass.cpp
1 ↗(On Diff #230719)

This needs to go under test/libcxx because it's libc++ specific.

libcxx/test/std/memory/nothing_to_do.pass.cpp
1 ↗(On Diff #230719)

Remove this file completely.

mvels updated this revision to Diff 233662.Dec 12 2019, 11:50 AM

Moved compressed_pair,pass.cpp to libcxx test dir

mvels marked 2 inline comments as done.Dec 12 2019, 11:51 AM