[libcxx-commits] [libcxx] [libc++] Implement LWG4406: value_or return statement is inconsistent with Mandates (PR #189568)
Fernando Pelliccioni via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 7 11:19:52 PDT 2026
================
@@ -89,6 +89,17 @@ constexpr int test()
assert(!opt);
}
#endif
+ // LWG3424: return type is remove_cv_t<T>
+ {
+ optional<const int> opt(2);
+ ASSERT_SAME_TYPE(decltype(opt.value_or(3)), int);
----------------
fpelliccioni wrote:
Done!
https://github.com/llvm/llvm-project/pull/189568
More information about the libcxx-commits
mailing list