diff --git a/src/json.hpp b/src/json.hpp index 392b2ab7..bf5dccfa 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -5085,14 +5085,14 @@ class basic_json using lexer_char_t = unsigned char; /// constructor with a given buffer - lexer(const string_t& s) noexcept + explicit lexer(const string_t& s) noexcept : m_stream(nullptr), m_buffer(s) { m_content = reinterpret_cast(s.c_str()); m_start = m_cursor = m_content; m_limit = m_content + s.size(); } - lexer(std::istream* s) noexcept + explicit lexer(std::istream* s) noexcept : m_stream(s), m_buffer() { getline(*m_stream, m_buffer); diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 9a06ad44..891cb3b4 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -5085,14 +5085,14 @@ class basic_json using lexer_char_t = unsigned char; /// constructor with a given buffer - lexer(const string_t& s) noexcept + explicit lexer(const string_t& s) noexcept : m_stream(nullptr), m_buffer(s) { m_content = reinterpret_cast(s.c_str()); m_start = m_cursor = m_content; m_limit = m_content + s.size(); } - lexer(std::istream* s) noexcept + explicit lexer(std::istream* s) noexcept : m_stream(s), m_buffer() { getline(*m_stream, m_buffer);