DAW JSON Link
daw_json_parse_string_need_slow.h
Go to the documentation of this file.
1 // Copyright (c) Darrell Wright
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
5 //
6 // Official repository: https://github.com/beached/daw_json_link
7 //
8 
9 #pragma once
10 
11 #include <cstddef>
12 
13 namespace daw::json::json_details {
14  /***
15  * When skip_string encounters escaping, it will note this as a non-zero value
16  */
17  template<typename Range>
18  constexpr inline bool needs_slow_path( Range const &rng ) {
19  return static_cast<std::ptrdiff_t>( rng.counter ) >= 0;
20  }
21 } // namespace daw::json::json_details