aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/nlohmann_json/include/nlohmann/detail/input/position_t.hpp
diff options
context:
space:
mode:
authormokhotskii <mokhotskii@ydb.tech>2022-07-21 12:48:53 +0300
committermokhotskii <mokhotskii@ydb.tech>2022-07-21 12:48:53 +0300
commit948e6e3dde5015c5506db8ac7c5cf218ef5131c3 (patch)
tree696b3a61764826759b57d996c4364e990479b588 /contrib/restricted/nlohmann_json/include/nlohmann/detail/input/position_t.hpp
parentb78ae8ac7797d88986dfa1526ea11fcbdb4f5f6f (diff)
downloadydb-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.hpp27
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