[libcxx-commits] [libcxx] [libc++] Implement Resolution of LWG 3886 (PR #155356)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 2 02:04:43 PDT 2025
================
@@ -64,6 +64,11 @@ constexpr int test()
assert(std::move(opt).value_or(Y(3)) == 4);
assert(!opt);
}
+ {
+ optional<X> opt;
+ assert(std::move(opt).value_or({Y(3)}) == 4);
----------------
frederick-vs-ja wrote:
I wonder whether we should test something like `std::move(opt).value_or({arg1, arg2})`...
https://github.com/llvm/llvm-project/pull/155356
More information about the libcxx-commits
mailing list