mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
cleanup
This commit is contained in:
48
src/json.hpp
48
src/json.hpp
@ -3767,6 +3767,32 @@ class basic_json
|
|||||||
return const_reverse_iterator(cbegin());
|
return const_reverse_iterator(cbegin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
// forward declaration
|
||||||
|
template<typename IteratorType> class iteration_proxy;
|
||||||
|
|
||||||
|
public:
|
||||||
|
/*!
|
||||||
|
@brief wrapper to access iterator member functions in range-based for
|
||||||
|
|
||||||
|
This functuion allows to access @ref iterator::key() and @ref
|
||||||
|
iterator::value() during range-based for loops. In these loops, a reference
|
||||||
|
to the JSON values is returned, so there is no access to the underlying
|
||||||
|
iterator.
|
||||||
|
*/
|
||||||
|
static iteration_proxy<iterator> iterator_wrapper(reference cont)
|
||||||
|
{
|
||||||
|
return iteration_proxy<iterator>(cont);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
@copydoc iterator_wrapper(reference)
|
||||||
|
*/
|
||||||
|
static iteration_proxy<const_iterator> iterator_wrapper(const_reference cont)
|
||||||
|
{
|
||||||
|
return iteration_proxy<const_iterator>(cont);
|
||||||
|
}
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
@ -6248,28 +6274,6 @@ class basic_json
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
|
||||||
/*!
|
|
||||||
@brief wrapper to access iterator member functions in range-based for
|
|
||||||
|
|
||||||
This functuion allows to access @ref iterator::key() and @ref
|
|
||||||
iterator::value() during range-based for loops. In these loops, a reference
|
|
||||||
to the JSON values is returned, so there is no access to the underlying
|
|
||||||
iterator.
|
|
||||||
*/
|
|
||||||
static iteration_proxy<iterator> iterator_wrapper(reference cont)
|
|
||||||
{
|
|
||||||
return iteration_proxy<iterator>(cont);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
@copydoc iterator_wrapper(reference)
|
|
||||||
*/
|
|
||||||
static iteration_proxy<const_iterator> iterator_wrapper(const_reference cont)
|
|
||||||
{
|
|
||||||
return iteration_proxy<const_iterator>(cont);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//////////////////////
|
//////////////////////
|
||||||
|
@ -3767,6 +3767,32 @@ class basic_json
|
|||||||
return const_reverse_iterator(cbegin());
|
return const_reverse_iterator(cbegin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
// forward declaration
|
||||||
|
template<typename IteratorType> class iteration_proxy;
|
||||||
|
|
||||||
|
public:
|
||||||
|
/*!
|
||||||
|
@brief wrapper to access iterator member functions in range-based for
|
||||||
|
|
||||||
|
This functuion allows to access @ref iterator::key() and @ref
|
||||||
|
iterator::value() during range-based for loops. In these loops, a reference
|
||||||
|
to the JSON values is returned, so there is no access to the underlying
|
||||||
|
iterator.
|
||||||
|
*/
|
||||||
|
static iteration_proxy<iterator> iterator_wrapper(reference cont)
|
||||||
|
{
|
||||||
|
return iteration_proxy<iterator>(cont);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
@copydoc iterator_wrapper(reference)
|
||||||
|
*/
|
||||||
|
static iteration_proxy<const_iterator> iterator_wrapper(const_reference cont)
|
||||||
|
{
|
||||||
|
return iteration_proxy<const_iterator>(cont);
|
||||||
|
}
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
@ -6248,28 +6274,6 @@ class basic_json
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
|
||||||
/*!
|
|
||||||
@brief wrapper to access iterator member functions in range-based for
|
|
||||||
|
|
||||||
This functuion allows to access @ref iterator::key() and @ref
|
|
||||||
iterator::value() during range-based for loops. In these loops, a reference
|
|
||||||
to the JSON values is returned, so there is no access to the underlying
|
|
||||||
iterator.
|
|
||||||
*/
|
|
||||||
static iteration_proxy<iterator> iterator_wrapper(reference cont)
|
|
||||||
{
|
|
||||||
return iteration_proxy<iterator>(cont);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
@copydoc iterator_wrapper(reference)
|
|
||||||
*/
|
|
||||||
static iteration_proxy<const_iterator> iterator_wrapper(const_reference cont)
|
|
||||||
{
|
|
||||||
return iteration_proxy<const_iterator>(cont);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//////////////////////
|
//////////////////////
|
||||||
|
Reference in New Issue
Block a user