json/doc/mkdocs/docs/api/json_pointer/empty.md
2021-11-05 21:43:46 +01:00

40 lines
611 B
Markdown

# json_pointer::empty
```cpp
bool empty() const noexcept;
```
Return whether pointer points to the root document.
## Return value
`#!cpp true` iff the JSON pointer points to the root document.
## Exception safety
No-throw guarantee: this function never throws exceptions.
## Complexity
Constant.
## Examples
??? example
The example shows the result of `empty` for different JSON Pointers.
```cpp
--8<-- "examples/json_pointer__empty.cpp"
```
Output:
```json
--8<-- "examples/json_pointer__empty.output"
```
## Version history
Added in version 3.6.0.