aboutsummaryrefslogtreecommitdiff
path: root/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp')
-rw-r--r--test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp b/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp
new file mode 100644
index 000000000000..62539ab3ee69
--- /dev/null
+++ b/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <system_error>
+// class error_condition
+
+// Make sure that the error_condition bits of <system_error> are self-contained.
+
+#include <system_error>
+#include "test_macros.h"
+
+int main()
+{
+ std::error_condition x = std::errc(0);
+ TEST_IGNORE_NODISCARD x.category(); // returns a std::error_condition &
+ TEST_IGNORE_NODISCARD x.message(); // returns a std::string
+}