[libcxx-commits] [libcxx] [libc++] Use availability to rely on key functions for bad_expected_access and bad_function_call (PR #87390)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 23 06:27:22 PDT 2024


================
@@ -0,0 +1,13 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <expected>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+const char* bad_expected_access<void>::what() const noexcept { return "bad access to std::expected"; }
----------------
zibi2 wrote:

> @zibi2 What standard version are you compiling the sources with?

For some reason we are compiling with -std=c++20 and thus the error.
Was there any recent change which started the -std=c++23 requirment?


https://github.com/llvm/llvm-project/pull/87390


More information about the libcxx-commits mailing list