]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/system/test/std_mismatch_test.cpp
2 // Copyright 2017 Peter Dimov.
4 // Distributed under the Boost Software License, Version 1.0.
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
9 // See library home page at http://www.boost.org/libs/system
11 // Avoid spurious VC++ warnings
12 # define _CRT_SECURE_NO_WARNINGS
14 #include <boost/config.hpp>
17 #if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR)
22 << "The version of the C++ standard library being used does not"
23 " support header <system_error> so interoperation will not be tested.\n";
28 #include <boost/system/error_code.hpp>
29 #include <boost/core/lightweight_test.hpp>
30 #include <system_error>
35 static void test_generic_category()
37 boost::system::error_category
const & bt
= boost::system::generic_category();
38 std::error_category
const & st
= bt
;
40 BOOST_TEST_CSTR_EQ( bt
.name(), st
.name() );
41 BOOST_TEST_EQ( bt
.name(), st
.name() );
44 static void test_system_category()
46 boost::system::error_category
const & bt
= boost::system::system_category();
47 std::error_category
const & st
= bt
;
49 BOOST_TEST_CSTR_EQ( bt
.name(), st
.name() );
50 BOOST_TEST_EQ( bt
.name(), st
.name() );
56 << "The version of the C++ standard library being used"
57 " supports header <system_error> so interoperation will be tested.\n";
59 test_generic_category();
60 test_system_category();
62 return boost::report_errors();