error.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Official repository: https://github.com/boostorg/json
  8. //
  9. #ifndef BOOST_JSON_IMPL_ERROR_HPP
  10. #define BOOST_JSON_IMPL_ERROR_HPP
  11. #include <type_traits>
  12. namespace boost {
  13. namespace system {
  14. template<>
  15. struct is_error_code_enum< ::boost::json::error >
  16. {
  17. static bool const value = true;
  18. };
  19. template<>
  20. struct is_error_condition_enum< ::boost::json::condition >
  21. {
  22. static bool const value = true;
  23. };
  24. } // system
  25. } // boost
  26. namespace std {
  27. template<>
  28. struct is_error_code_enum< ::boost::json::error >
  29. {
  30. static bool const value = true;
  31. };
  32. template<>
  33. struct is_error_condition_enum< ::boost::json::condition >
  34. {
  35. static bool const value = true;
  36. };
  37. } // std
  38. namespace boost {
  39. namespace json {
  40. BOOST_JSON_DECL
  41. error_code
  42. make_error_code(error e);
  43. BOOST_JSON_DECL
  44. error_condition
  45. make_error_condition(condition c);
  46. } // namespace json
  47. } // namespace boost
  48. #endif