[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 21:08:52 PST 2026
================
@@ -12,9 +12,10 @@
#include "test_allocator.h"
#include <type_traits>
#include <tuple>
+#include "test_macros.h"
// Types that can be used to test copy/move operations
-
+#if TEST_STD_VER >= 23
----------------
smallp-o-p wrote:
Sorry, I should've specified: I added this to the regular `optional` tests, which are ran in C++17, and the header uses concepts and I believe defaulted constexpr constructors which are not allowed before C++23.
`error: defaulted definition of default constructor cannot be marked constexpr before C++23`
I suppose I could just move the includes where I use them into the `#if TEST_STD_VER >= 26` guard.
https://github.com/llvm/llvm-project/pull/174537
More information about the libcxx-commits
mailing list