1
2// Copyright 2017 Peter Dimov.
3//
4// Distributed under the Boost Software License, Version 1.0.
5//
6// See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt
8
9// See library home page at http://www.boost.org/libs/system
10
11// Avoid spurious VC++ warnings
12# define _CRT_SECURE_NO_WARNINGS
13
14#include <boost/system/error_code.hpp>
15#include <boost/core/lightweight_test.hpp>
16#include <boost/config.hpp>
17#include <system_error>
18#include <cerrno>
19#include <string>
20#include <cstdio>
21
22static void test_generic_category()
23{
24 boost::system::error_category const & bt = boost::system::generic_category();
25 std::error_category const & st = bt;
26
27 BOOST_TEST_CSTR_EQ( bt.name(), st.name() );
28}
29
30static void test_system_category()
31{
32 boost::system::error_category const & bt = boost::system::system_category();
33 std::error_category const & st = bt;
34
35 BOOST_TEST_CSTR_EQ( bt.name(), st.name() );
36}
37
38int main()
39{
40 test_generic_category();
41 test_system_category();
42
43 return boost::report_errors();
44}
45

source code of boost/libs/system/test/std_mismatch_test.cpp