diff options
Diffstat (limited to 'test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/make_error_condition.pass.cpp')
-rw-r--r-- | test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/make_error_condition.pass.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/make_error_condition.pass.cpp b/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/make_error_condition.pass.cpp new file mode 100644 index 000000000000..acefc4655abf --- /dev/null +++ b/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.nonmembers/make_error_condition.pass.cpp @@ -0,0 +1,26 @@ +//===----------------------------------------------------------------------===// +// +// 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 + +// error_condition make_error_condition(errc e); + +#include <system_error> +#include <cassert> + +int main() +{ + { + const std::error_condition ec1 = std::make_error_condition(std::errc::message_size); + assert(ec1.value() == static_cast<int>(std::errc::message_size)); + assert(ec1.category() == std::generic_category()); + } +} |