[libcxx-commits] [libcxx] [libc++] Correct `optional<T&>` implementation (PR #174537)
William Tran-Viet via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 7 22:01:18 PST 2026
================
@@ -149,9 +149,48 @@ void test_explicit() {
#endif
}
+#if TEST_STD_VER >= 26
+struct Throws {
+ int val = 42;
+ bool b = false;
+ constexpr Throws() {};
+ operator int&() {
----------------
smallp-o-p wrote:
I don't think any compiler supports throwing in constant evaluation at the moment, so I will only evaluate the non-throwing case for now.
https://github.com/llvm/llvm-project/pull/174537
More information about the libcxx-commits
mailing list