31 if (str.
at(0) !=
'/') {
35 std::vector<std::string>
tokens;
36 splitTo<std::string>(
"/", str, std::inserter(tokens, tokens.begin()));
37 tokens.erase(tokens.begin());
39 for (
auto& token : tokens) {
54 switch (res.error()) {
57 "non-empty JSON pointer string does not start with '/'");
60 "Invalid escape sequence in JSON pointer string");
67 auto const& other_tokens = other.tokens();
68 if (
tokens_.size() > other_tokens.size()) {
71 auto const other_begin = other_tokens.cbegin();
72 auto const other_end = other_tokens.cbegin() +
tokens_.size();
73 return std::equal(
tokens_.cbegin(),
tokens_.cend(), other_begin, other_end);
86 char const*
end = &str[str.size()];
87 char* out = &str.front();
89 while (decode < end) {
94 if (decode + 1 == end) {
109 str.resize(out - &str.front());
static Expected< json_pointer, parse_error > try_parse(StringPiece const str)
static bool unescape(std::string &)
std::vector< std::string > const & tokens() const
TokenBindingMessage decode(folly::io::Cursor &cursor)
constexpr detail::Map< Move > move
bool is_prefix_of(json_pointer const &other) const noexcept
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
static json_pointer parse(StringPiece const str)
constexpr bool empty() const
FOLLY_ALWAYS_INLINE void assume_unreachable()
constexpr Unexpected< typename std::decay< Error >::type > makeUnexpected(Error &&)
auto end(TestAdlIterable &instance)
value_type & at(size_t i)
std::vector< std::string > tokens_