MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / parent_pointer

Method parent_pointer

lesson6-Segmentation/json.hpp:11757–11767  ·  view source on GitHub ↗

! @brief returns the parent of this JSON pointer @return parent of this JSON pointer; in case this JSON pointer is the root, the root itself is returned @complexity Linear in the length of the JSON pointer. @liveexample{The example shows the result of `parent_pointer` for different JSON Pointers.,json_pointer__parent_pointer} @since version 3.6.0 */

Source from the content-addressed store, hash-verified

11755 @since version 3.6.0
11756 */
11757 json_pointer parent_pointer() const
11758 {
11759 if (empty())
11760 {
11761 return *this;
11762 }
11763
11764 json_pointer res = *this;
11765 res.pop_back();
11766 return res;
11767 }
11768
11769 /*!
11770 @brief remove last reference token

Callers

nothing calls this directly

Calls 2

emptyFunction · 0.85
pop_backMethod · 0.80

Tested by

no test coverage detected