mirror of
https://github.com/boostorg/system.git
synced 2025-07-29 20:17:13 +02:00
Add boost/system.hpp
This commit is contained in:
13
include/boost/system.hpp
Normal file
13
include/boost/system.hpp
Normal 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
|
@ -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 );
|
||||
|
Reference in New Issue
Block a user