1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-15 07:41:50 +03:00
This commit is contained in:
Niels
2016-08-14 21:59:41 +02:00
parent 4871e39415
commit 92ee1d56eb
3 changed files with 62 additions and 40 deletions

View File

@ -7514,11 +7514,6 @@ class basic_json
m_limit = m_content + len;
}
/// a lexer from a string literal
explicit lexer(const typename string_t::value_type* buff) noexcept
: lexer(reinterpret_cast<const lexer_char_t*>(buff), strlen(buff))
{}
/// a lexer from an input stream
explicit lexer(std::istream& s)
: m_stream(&s), m_line_buffer()
@ -8178,7 +8173,9 @@ class basic_json
public:
/// a parser reading from a string literal
parser(const typename string_t::value_type* buff, parser_callback_t cb = nullptr)
: callback(cb), m_lexer(buff)
: callback(cb),
m_lexer(reinterpret_cast<const typename lexer::lexer_char_t*>(buff),
strlen(buff))
{}
/// a parser reading from a string container