Skip to content
Snippets Groups Projects
Commit eb5fb4b8 authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

[!681] stop using deprecated `std::iterator`

Merge branch 'stop-using-std-iterator' into 'master'

ref:core/dune-common Closes: [#166]

See merge request [!681]

  [#166]: gitlab.dune-project.org/NoneNone/issues/166
  [!681]: gitlab.dune-project.org/core/dune-common/merge_requests/681


Closes #166
parents 19557065 d55c8b6a
Branches
Tags
1 merge request!681stop using deprecated `std::iterator`
Pipeline #19074 passed
......@@ -135,15 +135,17 @@ namespace Dune
* \tparam D The type for differences between two iterators
*/
template<class T, class V, class R = V&, class D = std::ptrdiff_t>
class ForwardIteratorFacade :
public std::iterator< std::forward_iterator_tag,
typename std::remove_const<V>::type, // std::iterator needs mutable value type
D,
V*,
R>
class ForwardIteratorFacade
{
public:
/* type aliases required by C++ for iterators */
using iterator_category = std::forward_iterator_tag;
using value_type = typename std::remove_const<V>::type;
using difference_type = D;
using pointer = V*;
using reference = R;
/**
* @brief The type of derived iterator.
*
......@@ -266,15 +268,17 @@ namespace Dune
*
*/
template<class T, class V, class R = V&, class D = std::ptrdiff_t>
class BidirectionalIteratorFacade :
public std::iterator< std::bidirectional_iterator_tag,
typename std::remove_const<V>::type, // std::iterator needs mutable value type
D,
V*,
R>
class BidirectionalIteratorFacade
{
public:
/* type aliases required by C++ for iterators */
using iterator_category = std::bidirectional_iterator_tag;
using value_type = typename std::remove_const<V>::type;
using difference_type = D;
using pointer = V*;
using reference = R;
/**
* @brief The type of derived iterator.
*
......@@ -424,15 +428,17 @@ namespace Dune
*
*/
template<class T, class V, class R = V&, class D = std::ptrdiff_t>
class RandomAccessIteratorFacade :
public std::iterator< std::random_access_iterator_tag,
typename std::remove_const<V>::type, // std::iterator needs mutable value type
D,
V*,
R>
class RandomAccessIteratorFacade
{
public:
/* type aliases required by C++ for iterators */
using iterator_category = std::random_access_iterator_tag;
using value_type = typename std::remove_const<V>::type;
using difference_type = D;
using pointer = V*;
using reference = R;
/**
* @brief The type of derived iterator.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment