summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/20_util/expected/bad.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/20_util/expected/bad.cc')
-rw-r--r--libstdc++-v3/testsuite/20_util/expected/bad.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/20_util/expected/bad.cc b/libstdc++-v3/testsuite/20_util/expected/bad.cc
new file mode 100644
index 00000000000..17bc6d69e88
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/expected/bad.cc
@@ -0,0 +1,15 @@
+// { dg-options "-std=gnu++23" }
+// { dg-do compile }
+
+#include <expected>
+
+struct E {
+ E() = default;
+ E(E&&) = default;
+};
+
+void
+test_pr105146()
+{
+ std::bad_expected_access(E{});
+}