diff options
author | mokhotskii <mokhotskii@ydb.tech> | 2022-07-21 12:48:53 +0300 |
---|---|---|
committer | mokhotskii <mokhotskii@ydb.tech> | 2022-07-21 12:48:53 +0300 |
commit | 948e6e3dde5015c5506db8ac7c5cf218ef5131c3 (patch) | |
tree | 696b3a61764826759b57d996c4364e990479b588 /contrib/restricted/nlohmann_json/include/nlohmann/detail/input/position_t.hpp | |
parent | b78ae8ac7797d88986dfa1526ea11fcbdb4f5f6f (diff) | |
download | ydb-948e6e3dde5015c5506db8ac7c5cf218ef5131c3.tar.gz |
Support incoming messages in cbor format
Support incoming messages in cbor format
Changes in YDS HTTP proxy
Diffstat (limited to 'contrib/restricted/nlohmann_json/include/nlohmann/detail/input/position_t.hpp')
-rw-r--r-- | contrib/restricted/nlohmann_json/include/nlohmann/detail/input/position_t.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/restricted/nlohmann_json/include/nlohmann/detail/input/position_t.hpp b/contrib/restricted/nlohmann_json/include/nlohmann/detail/input/position_t.hpp new file mode 100644 index 0000000000..14e9649fb2 --- /dev/null +++ b/contrib/restricted/nlohmann_json/include/nlohmann/detail/input/position_t.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include <cstddef> // size_t + +namespace nlohmann +{ +namespace detail +{ +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +} // namespace nlohmann |