JSON for Modern C++ 2.1.1
Loading...
Searching...
No Matches

◆ crbegin()

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 = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer>
const_reverse_iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >::crbegin ( ) const
inlinenoexcept

Returns a const iterator to the reverse-beginning; that is, the last element.

Illustration from cppreference.com
Complexity\n Constant.
Requirements\n This function helps basic_json satisfying the
ReversibleContainer requirements:
  • The complexity is constant.
  • Has the semantics of const_cast<const basic_json&>(*this).rbegin().
Example\n The following code shows an example for crbegin(). \n @includelineno crbegin.cpp \n Output (play with this example @htmlinclude crbegin.link):\n @verbinclude crbegin.output \n The example code above can be translated with @verbatim g++ -std=c++11 -Isrc doc/examples/crbegin.cpp -o crbegin @endverbatim
See also
rbegin() – returns a reverse iterator to the beginning
rend() – returns a reverse iterator to the end
crend() – returns a const reverse iterator to the end
Since
version 1.0.0

Definition at line 4885 of file json.hpp.