[libcxx-commits] [libcxx] [libcxx] Enrich message for std::bad_variant_access exception (PR #196495)
Nikita Grivin via libcxx-commits
libcxx-commits at lists.llvm.org
Sun May 10 01:50:22 PDT 2026
================
@@ -0,0 +1,92 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, no-exceptions
----------------
MindSpectre wrote:
The new file is libc++-specific (the exact message strings are implementation-defined). The existing bad_variant_access.pass.cpp under `test/std/` covers the standard-conformance side and stays unchanged.
On UNSUPPORTED: I mirrored the directive style from the file you linked [test/std/utilities/variant/variant.bad_access/bad_variant_access.pass.cpp](https://github.com/llvm/llvm-project/blob/main/libcxx/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp), which uses `UNSUPPORTED: c++03, c++11, c++14`
https://github.com/llvm/llvm-project/pull/196495
More information about the libcxx-commits
mailing list