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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 23 06:13:34 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"; }
----------------
ldionne wrote:

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

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


More information about the libcxx-commits mailing list