Add default initialization to compressed_pair.
authorEric Fiselier <eric@efcs.ca>
Mon, 16 Dec 2019 22:00:10 +0000 (17:00 -0500)
committerEric Fiselier <eric@efcs.ca>
Mon, 16 Dec 2019 22:14:02 +0000 (17:14 -0500)
commit0fa118a9da6786a0aaf81e309d8c3b38bc5f61dd
tree35ca50f76b6a25500485f7a44fe9db5fd86f6cf9
parent3f22b4721e6c9859c392d9891411cbc8d9e10c70
Add default initialization to compressed_pair.

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 explicitly initialize the values in the constructor.

Patch by Martijn Vels (mvels@google.com)
Reviewed as https://reviews.llvm.org/D70617
libcxx/include/memory
libcxx/test/libcxx/memory/compressed_pair/compressed_pair.pass.cpp [new file with mode: 0644]