diff options
author | Christopher Di Bella <cjdb@google.com> | 2021-05-09 01:30:32 +0000 |
---|---|---|
committer | Christopher Di Bella <cjdb@google.com> | 2021-06-10 05:52:47 +0000 |
commit | 546449938a39dcc65f60f8d6e44e7b058a026549 (patch) | |
tree | 14b6e02b18d1cba5bd9550ef3a2b0c586e0a2b33 /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | b5d6da3587469246a77d573fdf17ffa85a07673c (diff) | |
download | llvm-546449938a39dcc65f60f8d6e44e7b058a026549.zip llvm-546449938a39dcc65f60f8d6e44e7b058a026549.tar.gz llvm-546449938a39dcc65f60f8d6e44e7b058a026549.tar.bz2 |
[libcxx][optional] adds missing constexpr operations
Makes the following operations constexpr:
* `std::swap(optional, optional)`
* `optional(optional<U> const&)`
* `optional(optional<U>&&)`
* `~optional()`
* `operator=(nullopt_t)`
* `operator=(U&&)`
* `operator=(optional<U> const&)`
* `operator=(optional<U>&&)`
* `emplace(Args&&...)`
* `emplace(initializer_list<U>, Args&&...)`
* `swap(optional&)`
* `reset()`
P2231 has been accepted by plenary, with the committee recommending
implementers retroactively apply to C++20. It's necessary for us to
implement _`semiregular-box`_ and _`non-propagating-cache`_, both of
which are required for ranges (otherwise we'll need to reimplement
`std::optional` with these members `constexpr`ified).
Differential Revision: https://reviews.llvm.org/D102119
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions