forked from boostorg/system
Define result in boost::system instead of in boost::result
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#ifndef BOOST_RESULT_RESULT_HPP_INCLUDED
|
||||
#define BOOST_RESULT_RESULT_HPP_INCLUDED
|
||||
#ifndef BOOST_SYSTEM_RESULT_HPP_INCLUDED
|
||||
#define BOOST_SYSTEM_RESULT_HPP_INCLUDED
|
||||
|
||||
// Copyright 2017, 2021 Peter Dimov.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
@ -18,16 +18,20 @@
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace result
|
||||
namespace system
|
||||
{
|
||||
|
||||
class error_code;
|
||||
|
||||
// throw_exception_from_error_code
|
||||
|
||||
BOOST_NORETURN void throw_exception_from_error_code( std::error_code const & e )
|
||||
BOOST_NORETURN inline void throw_exception_from_error_code( std::error_code const & e )
|
||||
{
|
||||
boost::throw_exception( std::system_error( e ) );
|
||||
}
|
||||
|
||||
BOOST_NORETURN inline void throw_exception_from_error_code( error_code const & e );
|
||||
|
||||
// in_place_*
|
||||
|
||||
using in_place_value_t = variant2::in_place_index_t<0>;
|
||||
@ -38,7 +42,7 @@ constexpr in_place_error_t in_place_error{};
|
||||
|
||||
// result
|
||||
|
||||
template<class T, class E = std::error_code> class result
|
||||
template<class T, class E = error_code> class result
|
||||
{
|
||||
private:
|
||||
|
||||
@ -335,7 +339,7 @@ template<class Ch, class Tr, class T, class E> std::basic_ostream<Ch, Tr>& opera
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace result
|
||||
} // namespace system
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_RESULT_RESULT_HPP_INCLUDED
|
||||
#endif // #ifndef BOOST_SYSTEM_RESULT_HPP_INCLUDED
|
||||
|
@ -2,14 +2,14 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <system_error>
|
||||
#include <iosfwd>
|
||||
#include <cerrno>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
@ -2,11 +2,11 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
@ -2,11 +2,11 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
@ -2,13 +2,13 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <system_error>
|
||||
#include <iosfwd>
|
||||
#include <cerrno>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
@ -2,12 +2,12 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <string>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
@ -2,14 +2,14 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <system_error>
|
||||
#include <string>
|
||||
#include <cerrno>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
@ -2,14 +2,14 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <system_error>
|
||||
#include <iosfwd>
|
||||
#include <cerrno>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
@ -2,11 +2,11 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
@ -2,13 +2,13 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <system_error>
|
||||
#include <iosfwd>
|
||||
#include <cerrno>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
@ -2,11 +2,11 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
@ -2,11 +2,11 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/result/result.hpp>
|
||||
#include <boost/system/result.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
using namespace boost::result;
|
||||
using namespace boost::system;
|
||||
|
||||
struct X
|
||||
{
|
||||
|
Reference in New Issue
Block a user