errc.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef BOOST_SYSTEM_ERRC_HPP_INCLUDED
  2. #define BOOST_SYSTEM_ERRC_HPP_INCLUDED
  3. // Copyright Beman Dawes 2006, 2007
  4. // Copyright Christoper Kohlhoff 2007
  5. // Copyright Peter Dimov 2017, 2018, 2020
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // See library home page at http://www.boost.org/libs/system
  11. #include <boost/system/detail/errc.hpp>
  12. #include <boost/system/detail/error_code.hpp>
  13. #include <boost/system/detail/error_condition.hpp>
  14. #include <boost/system/detail/generic_category.hpp>
  15. #include <boost/system/detail/error_category_impl.hpp>
  16. #include <boost/system/detail/config.hpp>
  17. #include <boost/config.hpp>
  18. namespace boost
  19. {
  20. namespace system
  21. {
  22. // make_* functions for errc::errc_t
  23. namespace errc
  24. {
  25. // explicit conversion:
  26. BOOST_SYSTEM_CONSTEXPR inline error_code make_error_code( errc_t e ) BOOST_NOEXCEPT
  27. {
  28. return error_code( e, generic_category() );
  29. }
  30. // implicit conversion:
  31. BOOST_SYSTEM_CONSTEXPR inline error_condition make_error_condition( errc_t e ) BOOST_NOEXCEPT
  32. {
  33. return error_condition( e, generic_category() );
  34. }
  35. } // namespace errc
  36. } // namespace system
  37. } // namespace boost
  38. #endif // #ifndef BOOST_SYSTEM_ERRC_HPP_INCLUDED