JSON for Modern C++ 3.0

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | List of all members
nlohmann::basic_json::reverse_iterator Class Reference

a reverse random access iterator for the basic_json class More...

`#include <json.hpp>`

## Public Types
using | base_iterator = std::reverse_iterator< typename basic_json::iterator >
| shortcut to the reverse iterator adaptor More...

## Public Member Functions
| reverse_iterator (const typename base_iterator::iterator_type &it)
| create reverse iterator from iterator More...
| reverse_iterator (const base_iterator &it)
| create reverse iterator from base class More...
object_t::key_type | key () const
| return the key of an object iterator More...
reverse_iterator | operator+ (difference_type i) const
| add to iterator More...
reverse_iterator | operator++ (int)
| post-increment (it++) More...
reverse_iterator & | operator++ ()
| pre-increment (++it) More...
reverse_iterator & | operator+= (difference_type i)
| add to iterator More...
reverse_iterator | operator- (difference_type i) const
| subtract from iterator More...
difference_type | operator- (const reverse_iterator &other) const
| return difference More...
reverse_iterator | operator-- (int)
| post-decrement (it–) More...
reverse_iterator & | operator-- ()
| pre-decrement (–it) More...
reference | operator[] (difference_type n) const
| access to successor More...
reference | value () const
| return the value of an iterator More...

## Detailed Description

### template<template< typename U, typename V, typename...Args > class ObjectType = std::map, template< typename U, typename...Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = int64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator>
class nlohmann::basic_json::reverse_iterator

The reverse iterator is realized with the `std::reverse_iterator` adaptor. This adaptor does not automatically inherit all functionality from the base iterator class, so some functions need to be explicitly implemented by either delegating them to the base class or by using the `base()` function to access the underlying base iterator.

The following operators are implicitly inherited:

- `operator==`, `operator!=`, `operator<`, `operator<=`, `operator>`, `operator>=`
- `operator-=`
- `operator->`, `operator*`