Merge branch 'develop' into feature/std-category

This commit is contained in:
Peter Dimov
2021-09-20 17:41:47 +03:00
4 changed files with 44 additions and 1 deletions

View File

@ -6,8 +6,8 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/system/errc.hpp>
#include <boost/system/detail/error_code.hpp>
#include <boost/system/detail/error_category_impl.hpp>
#include <boost/system/detail/snprintf.hpp>
#include <string>
#include <stdexcept>

View File

@ -103,6 +103,7 @@ boost_test(TYPE run SOURCES ec_location_test.cpp)
boost_test(TYPE run SOURCES error_condition_test3.cpp)
boost_test(TYPE run SOURCES error_code_test2.cpp)
boost_test(TYPE run SOURCES system_error_test2.cpp)
# result

View File

@ -125,6 +125,7 @@ run ec_location_test.cpp ;
run error_condition_test3.cpp ;
run error_code_test2.cpp ;
run system_error_test2.cpp ;
# result

View File

@ -0,0 +1,41 @@
// Copyright 2021 Peter Dimov
// Distributed under the Boost Software License, Version 1.0
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/system/system_error.hpp>
#include <boost/core/lightweight_test.hpp>
#include <cerrno>
namespace sys = boost::system;
int main()
{
{
sys::error_code ec( 5, sys::generic_category() );
sys::system_error x1( ec );
(void)x1;
}
{
sys::error_code ec( 5, sys::system_category() );
sys::system_error x1( ec );
(void)x1;
}
{
sys::system_error x1( make_error_code( sys::errc::invalid_argument ) );
(void)x1;
}
{
sys::system_error x1( 5, sys::generic_category() );
(void)x1;
}
{
sys::system_error x1( 5, sys::system_category() );
(void)x1;
}
return boost::report_errors();
}