1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9// <ios>
10
11// error_condition make_error_condition(io_errc e);
12
13#include <ios>
14#include <cassert>
15
16#include "test_macros.h"
17
18int main(int, char**)
19{
20 {
21 const std::error_condition ec1 = std::make_error_condition(e: std::io_errc::stream);
22 assert(ec1.value() == static_cast<int>(std::io_errc::stream));
23 assert(ec1.category() == std::iostream_category());
24 }
25
26 return 0;
27}
28

source code of libcxx/test/std/input.output/iostreams.base/std.ios.manip/error.reporting/make_error_condition.pass.cpp