Commit fcbd984e by Niels

cleanup

parent 70493a10
...@@ -3767,6 +3767,32 @@ class basic_json ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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:
////////////////////// //////////////////////
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment