[libcxx-commits] [libcxx] [libc++] Make `constexpr std::variant`. Implement P2231R1 (PR #83335)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 3 07:12:44 PST 2024
================
@@ -42,26 +42,27 @@ namespace std {
in_place_index_t<I>, initializer_list<U>, Args&&...);
// 20.7.2.2, destructor
- ~variant();
+ constexpr ~variant(); // constexpr since c++20
// 20.7.2.3, assignment
constexpr variant& operator=(const variant&);
constexpr variant& operator=(variant&&) noexcept(see below);
- template <class T> variant& operator=(T&&) noexcept(see below);
+ template <class T>
+ constexpr variant& operator=(T&&) noexcept(see below); // constexpr since c++20
----------------
mordante wrote:
nit: Can you try to align all `// constexpr since c++20` for all changes?
https://github.com/llvm/llvm-project/pull/83335
More information about the libcxx-commits
mailing list