Add boost/system.hpp

This commit is contained in:
Peter Dimov
2021-06-11 21:15:17 +03:00
parent 8560290b71
commit ff9bca96e3
2 changed files with 22 additions and 8 deletions

13
include/boost/system.hpp Normal file
View File

@ -0,0 +1,13 @@
#ifndef BOOST_SYSTEM_HPP_INCLUDED
#define BOOST_SYSTEM_HPP_INCLUDED
// Copyright 2021 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt)
//
// See library home page at http://www.boost.org/libs/system
#include <boost/system/error_code.hpp>
#include <boost/system/system_error.hpp>
#endif // #ifndef BOOST_SYSTEM_HPP_INCLUDED

View File

@ -1,15 +1,10 @@
// Copyright 2017 Peter Dimov.
//
// Copyright 2017, 2021 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
//
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
// https://www.boost.org/LICENSE_1_0.txt
// See library home page at http://www.boost.org/libs/system
#include <boost/system/system_error.hpp>
#include <boost/system/error_code.hpp>
#include <boost/system.hpp>
#include <boost/core/lightweight_test.hpp>
#include <cerrno>
@ -33,6 +28,12 @@ int main()
BOOST_TEST( bc == bn );
boost::system::error_code bc2 = make_error_code( boost::system::errc::no_such_file_or_directory );
BOOST_TEST_EQ( bc2, bc );
BOOST_TEST_EQ( bc2.value(), ev );
BOOST_TEST_EQ( &bc.category(), &bt );
boost::system::system_error x( bc, "prefix" );
BOOST_TEST_EQ( x.code(), bc );