| 10416 | } |
| 10417 | |
| 10418 | json_pointer top() const |
| 10419 | { |
| 10420 | if (JSON_HEDLEY_UNLIKELY(empty())) |
| 10421 | { |
| 10422 | JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent")); |
| 10423 | } |
| 10424 | |
| 10425 | json_pointer result = *this; |
| 10426 | result.reference_tokens = {reference_tokens[0]}; |
| 10427 | return result; |
| 10428 | } |
| 10429 | |
| 10430 | /*! |
| 10431 | @brief create and return a reference to the pointed to value |