MCPcopy Create free account
hub / github.com/PeterFWS/Structure-PLP-SLAM / array_index

Method array_index

3rd/json/include/nlohmann/json.hpp:8739–8751  ·  view source on GitHub ↗

! @param[in] s reference token to be converted into an array index @return integer representation of @a s @throw out_of_range.404 if string @a s could not be converted to an integer */

Source from the content-addressed store, hash-verified

8737 @throw out_of_range.404 if string @a s could not be converted to an integer
8738 */
8739 static int array_index(const std::string& s)
8740 {
8741 std::size_t processed_chars = 0;
8742 const int res = std::stoi(s, &processed_chars);
8743
8744 // check if the string was completely read
8745 if (JSON_UNLIKELY(processed_chars != s.size()))
8746 {
8747 JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + s + "'"));
8748 }
8749
8750 return res;
8751 }
8752
8753 json_pointer top() const
8754 {

Callers

nothing calls this directly

Calls 2

createFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected