#include <json.hpp>
|
static void | fill_buffer (const WideStringType &str, size_t ¤t_wchar, std::array< std::char_traits< char >::int_type, 4 > &utf8_bytes, size_t &utf8_bytes_index, size_t &utf8_bytes_filled) |
|
template<typename WideStringType, size_t T>
struct nlohmann::detail::wide_string_input_helper< WideStringType, T >
Definition at line 4027 of file json.hpp.
template<typename WideStringType , size_t T>
Definition at line 4030 of file json.hpp.
4036 utf8_bytes_index = 0;
4038 if (current_wchar == str.size())
4040 utf8_bytes[0] = std::char_traits<char>::eof();
4041 utf8_bytes_filled = 1;
4046 const auto wc =
static_cast<unsigned int>(str[current_wchar++]);
4051 utf8_bytes[0] =
static_cast<std::char_traits<char>::int_type
>(wc);
4052 utf8_bytes_filled = 1;
4054 else if (wc <= 0x7FF)
4056 utf8_bytes[0] =
static_cast<std::char_traits<char>::int_type
>(0xC0u | ((wc >> 6u) & 0x1Fu));
4057 utf8_bytes[1] =
static_cast<std::char_traits<char>::int_type
>(0x80u | (wc & 0x3Fu));
4058 utf8_bytes_filled = 2;
4060 else if (wc <= 0xFFFF)
4062 utf8_bytes[0] =
static_cast<std::char_traits<char>::int_type
>(0xE0u | ((wc >> 12u) & 0x0Fu));
4063 utf8_bytes[1] =
static_cast<std::char_traits<char>::int_type
>(0x80u | ((wc >> 6u) & 0x3Fu));
4064 utf8_bytes[2] =
static_cast<std::char_traits<char>::int_type
>(0x80u | (wc & 0x3Fu));
4065 utf8_bytes_filled = 3;
4067 else if (wc <= 0x10FFFF)
4069 utf8_bytes[0] =
static_cast<std::char_traits<char>::int_type
>(0xF0u | ((wc >> 18u) & 0x07u));
4070 utf8_bytes[1] =
static_cast<std::char_traits<char>::int_type
>(0x80u | ((wc >> 12u) & 0x3Fu));
4071 utf8_bytes[2] =
static_cast<std::char_traits<char>::int_type
>(0x80u | ((wc >> 6u) & 0x3Fu));
4072 utf8_bytes[3] =
static_cast<std::char_traits<char>::int_type
>(0x80u | (wc & 0x3Fu));
4073 utf8_bytes_filled = 4;
4078 utf8_bytes[0] =
static_cast<std::char_traits<char>::int_type
>(wc);
4079 utf8_bytes_filled = 1;
The documentation for this struct was generated from the following file: