File indexing completed on 2025-01-18 09:39:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_JSON_IMPL_KIND_IPP
0011 #define BOOST_JSON_IMPL_KIND_IPP
0012
0013 #include <boost/json/kind.hpp>
0014 #include <ostream>
0015
0016 namespace boost {
0017 namespace json {
0018
0019 string_view
0020 to_string(kind k) noexcept
0021 {
0022 switch(k)
0023 {
0024 case kind::array: return "array";
0025 case kind::object: return "object";
0026 case kind::string: return "string";
0027 case kind::int64: return "int64";
0028 case kind::uint64: return "uint64";
0029 case kind::double_: return "double";
0030 case kind::bool_: return "bool";
0031 default:
0032 case kind::null: return "null";
0033 }
0034 }
0035
0036 std::ostream&
0037 operator<<(std::ostream& os, kind k)
0038 {
0039 os << to_string(k);
0040 return os;
0041 }
0042
0043 }
0044 }
0045
0046 #endif