Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:53

0001 #ifndef BOOST_COMPAT_DETAIL_THROW_SYSTEM_ERROR_HPP_INCLUDED
0002 #define BOOST_COMPAT_DETAIL_THROW_SYSTEM_ERROR_HPP_INCLUDED
0003 
0004 // Copyright 2023 Peter Dimov
0005 // Distributed under the Boost Software License, Version 1.0.
0006 // https://www.boost.org/LICENSE_1_0.txt
0007 
0008 #include <boost/throw_exception.hpp>
0009 #include <boost/config.hpp>
0010 #include <system_error>
0011 
0012 namespace boost {
0013 namespace compat {
0014 namespace detail {
0015 
0016 BOOST_NORETURN BOOST_NOINLINE inline void throw_system_error( std::errc e, boost::source_location const& loc = BOOST_CURRENT_LOCATION )
0017 {
0018     boost::throw_exception( std::system_error( std::make_error_code( e ) ), loc );
0019 }
0020 
0021 } // namespace detail
0022 } // namespace compat
0023 } // namespace boost
0024 
0025 #endif // BOOST_COMPAT_DETAIL_THROW_SYSTEM_ERROR_HPP_INCLUDED