]>
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/system/error_code.hpp>
15 #include <boost/config.hpp>
16 #include <boost/config/pragma_message.hpp>
19 #if !defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
21 BOOST_PRAGMA_MESSAGE( "BOOST_SYSTEM_HAS_SYSTEM_ERROR not defined, test will be skipped" )
26 << "The version of the C++ standard library being used does not"
27 " support header <system_error> so interoperation will not be tested.\n";
32 #include <boost/core/lightweight_test.hpp>
33 #include <system_error>
38 static void test_generic_category()
40 boost::system::error_category
const & bt
= boost::system::generic_category();
41 std::error_category
const & st
= bt
;
43 BOOST_TEST_CSTR_EQ( bt
.name(), st
.name() );
46 static void test_system_category()
48 boost::system::error_category
const & bt
= boost::system::system_category();
49 std::error_category
const & st
= bt
;
51 BOOST_TEST_CSTR_EQ( bt
.name(), st
.name() );
57 << "The version of the C++ standard library being used"
58 " supports header <system_error> so interoperation will be tested.\n";
60 test_generic_category();
61 test_system_category();
63 return boost::report_errors();