1 #pragma once 2 3 #include <cstddef> // size_t 4 5 namespace nlohmann 6 { 7 namespace detail 8 { 9 /// struct to capture the start position of the current token 10 struct position_t 11 { 12 /// the total number of characters read 13 std::size_t chars_read_total = 0; 14 /// the number of characters read in the current line 15 std::size_t chars_read_current_line = 0; 16 /// the number of lines read 17 std::size_t lines_read = 0; 18 19 /// conversion to size_t to preserve SAX interface operator size_tnlohmann::detail::position_t20 constexpr operator size_t() const 21 { 22 return chars_read_total; 23 } 24 }; 25 26 } // namespace detail 27 } // namespace nlohmann 28