From ff9bca96e3723a50403f9aae557a7ad7c925c69f Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 11 Jun 2021 21:15:17 +0300 Subject: [PATCH] Add boost/system.hpp --- include/boost/system.hpp | 13 +++++++++++++ test/quick.cpp | 17 +++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 include/boost/system.hpp diff --git a/include/boost/system.hpp b/include/boost/system.hpp new file mode 100644 index 0000000..3ab9a45 --- /dev/null +++ b/include/boost/system.hpp @@ -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 +#include + +#endif // #ifndef BOOST_SYSTEM_HPP_INCLUDED diff --git a/test/quick.cpp b/test/quick.cpp index 535ce6a..58c7d76 100644 --- a/test/quick.cpp +++ b/test/quick.cpp @@ -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 -#include +#include #include #include @@ -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 );