DUNE PDELab (git)
iteratorfacades.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
402 typename std::enable_if<std::is_convertible<T1,T2>::value && !std::is_convertible<T2,T1>::value,
834 Dune::Concept::requireConvertible<bool>(IteratorFacadeAccess::baseIterator(it1) == IteratorFacadeAccess::baseIterator(it2))
886 Dune::Concept::requireConvertible<D>(IteratorFacadeAccess::baseIterator(it1) - IteratorFacadeAccess::baseIterator(it2))
1054 static constexpr bool isBidirectional = std::is_convertible_v<C, std::bidirectional_iterator_tag>;
1055 static constexpr bool isRandomAccess = std::is_convertible_v<C, std::random_access_iterator_tag>;
1101 "Derived class does not implement `*it` or `*(it.baseIterator())` for const `it` required by IteratorFacade<..., std::forward_iterator_tag, ...>.");
1103 "Derived class does not implement `++it`, `++(it.baseIterator())`, or `it+=1` for mutable `it` required by IteratorFacade<..., std::forward_iterator_tag, ...>.");
1105 "Derived class does not implement `it1==it2` or `it1.baseIterator()==it2.baseIterator()` for const `it1` and `it2` required by IteratorFacade<..., std::forward_iterator_tag, ...>.");
1108 "Derived class does not implement `--it`, `--(it.baseIterator())`, or `it-=1` for mutable `it` required by IteratorFacade<..., std::bidirectional_iterator_tag, ...>.");
1111 static_assert(std::is_convertible_v<decltype(derived()+=std::declval<difference_type>()), DerivedIterator&>,
1112 "Derived class does not implement `it+=` or `it.baseIterator()+=` for mutable `it` required by IteratorFacade<..., std::random_access_iterator_tag, ...>.");
1114 "Derived class does not implement `it1-it2` or `it1.baseIterator()-it2.baseIterator()` for const `it1` and `it2` required by IteratorFacade<..., std::random_access_iterator_tag, ...>.");
1121 if constexpr (Dune::models<Impl::Concepts::BaseIterDereferenceOp<reference>, DerivedIterator>())
1125 "Derived class does not implement `*it` or `*(it.baseIterator())` for const `it` required by IteratorFacade<..., std::forward_iterator_tag, ...>.");
1145 else if constexpr (Dune::models<Impl::Concepts::IterAdvanceOp<difference_type>, DerivedIterator>())
1152 "Derived class does not implement `++it`, `++(it.baseIterator())`, or `it+=1` for mutable `it` required by IteratorFacade<..., std::forward_iterator_tag, ...>.");
1176 else if constexpr (Dune::models<Impl::Concepts::IterAdvanceOp<difference_type>, DerivedIterator>())
1183 "Derived class does not implement `--it`, `--(it.baseIterator())`, or `it-=1` for mutable `it` required by IteratorFacade<..., std::bidirectional_iterator_tag, ...>.");
1220 if constexpr (Dune::models<Impl::Concepts::BaseIterAdvanceOp<difference_type>, DerivedIterator>())
1227 "Derived class does not implement `it+=` or `it.baseIterator()+=` for mutable `it` required by IteratorFacade<..., std::random_access_iterator_tag, ...>.");
1295 template<class T1, class T2, class C, class V1, class V2, class R1, class R2, class P1, class P2, class D1, class D2>
1296 constexpr auto operator==(const IteratorFacade<T1,C,V1,R1,P1,D1>& it1, const IteratorFacade<T2,C,V2,R2,P2,D2>& it2)
1301 return IteratorFacadeAccess::baseIterator(derivedIt1) == IteratorFacadeAccess::baseIterator(derivedIt2);
1304 "Derived class does not implement `it1==it2` or `it1.baseIterator()==it2.baseIterator()` for const `it1` and `it2` required by IteratorFacade<..., std::forward_iterator_tag, ...>.");
1314 template<class T1, class T2, class C, class V1, class V2, class R1, class R2, class P1, class P2, class D1, class D2,
1316 constexpr bool operator!=(const IteratorFacade<T1,C,V1,R1,P1,D1>& it1, const IteratorFacade<T2,C,V2,R2,P2,D2>& it2)
1333 template<class T1, class T2, class C, class V1, class V2, class R1, class R2, class P1, class P2, class D>
1334 constexpr auto operator-(const IteratorFacade<T1,C,V1,R1,P1,D>& it1, const IteratorFacade<T2,C,V2,R2,P2,D>& it2)
1339 return D(IteratorFacadeAccess::baseIterator(derivedIt1) - IteratorFacadeAccess::baseIterator(derivedIt2));
1342 "Derived class does not implement `it1-it2` or `it1.baseIterator()-it2.baseIterator()` for const `it1` and `it2` required by IteratorFacade<..., std::random_access_iterator_tag, ...>.");
1352 template<class T1, class T2, class C, class V1, class V2, class R1, class R2, class P1, class P2, class D1, class D2,
1354 constexpr bool operator<(const IteratorFacade<T1,C,V1,R1,P1,D1>& it1, const IteratorFacade<T2,C,V2,R2,P2,D2>& it2)
1368 template<class T1, class T2, class C, class V1, class V2, class R1, class R2, class P1, class P2, class D1, class D2,
1370 constexpr bool operator<=(const IteratorFacade<T1,C,V1,R1,P1,D1>& it1, const IteratorFacade<T2,C,V2,R2,P2,D2>& it2)
1384 template<class T1, class T2, class C, class V1, class V2, class R1, class R2, class P1, class P2, class D1, class D2,
1386 constexpr bool operator>(const IteratorFacade<T1,C,V1,R1,P1,D1>& it1, const IteratorFacade<T2,C,V2,R2,P2,D2>& it2)
1400 template<class T1, class T2, class C, class V1, class V2, class R1, class R2, class P1, class P2, class D1, class D2,
1402 constexpr bool operator>=(const IteratorFacade<T1,C,V1,R1,P1,D1>& it1, const IteratorFacade<T2,C,V2,R2,P2,D2>& it2)
Facade class for stl conformant bidirectional iterators.
Definition: iteratorfacades.hh:275
Reference operator*() const
Dereferencing operator.
Definition: iteratorfacades.hh:333
T DerivedType
The type of derived iterator.
Definition: iteratorfacades.hh:310
DerivedType & operator--()
Preincrement operator.
Definition: iteratorfacades.hh:360
DerivedType & operator++()
Preincrement operator.
Definition: iteratorfacades.hh:344
V * Pointer
The pointer to the Value.
Definition: iteratorfacades.hh:320
R Reference
The type of the reference to the values accessed.
Definition: iteratorfacades.hh:330
DerivedType operator++(int)
Postincrement operator.
Definition: iteratorfacades.hh:351
D DifferenceType
The type of the difference between two positions.
Definition: iteratorfacades.hh:325
DerivedType operator--(int)
Postincrement operator.
Definition: iteratorfacades.hh:367
V Value
The type of value accessed through the iterator.
Definition: iteratorfacades.hh:315
Base class for stl conformant forward iterators.
Definition: iteratorfacades.hh:142
DerivedType & operator++()
Preincrement operator.
Definition: iteratorfacades.hh:210
D DifferenceType
The type of the difference between two positions.
Definition: iteratorfacades.hh:191
R Reference
The type of the reference to the values accessed.
Definition: iteratorfacades.hh:196
T DerivedType
The type of derived iterator.
Definition: iteratorfacades.hh:176
V Value
The type of value accessed through the iterator.
Definition: iteratorfacades.hh:181
DerivedType operator++(int)
Postincrement operator.
Definition: iteratorfacades.hh:217
V * Pointer
The pointer to the Value.
Definition: iteratorfacades.hh:186
Reference operator*() const
Dereferencing operator.
Definition: iteratorfacades.hh:199
CRTP-Mixing class for stl conformant iterators of given iterator category.
Definition: iteratorfacades.hh:1053
constexpr DerivedIterator operator--(int)
Postdecrement operator.
Definition: iteratorfacades.hh:1192
constexpr pointer operator->() const
Arrow access to members of referenced value.
Definition: iteratorfacades.hh:1129
constexpr DerivedIterator operator+(difference_type n) const
Create iterator incremented by given value.
Definition: iteratorfacades.hh:1236
constexpr DerivedIterator operator++(int)
Postincrement operator.
Definition: iteratorfacades.hh:1156
constexpr DerivedIterator & derived()
Cast of *this to DerivedIterator type.
Definition: iteratorfacades.hh:1074
It DerivedIterator
The derived iterator type.
Definition: iteratorfacades.hh:1065
constexpr DerivedIterator & operator-=(difference_type n)
Decrement iterator by given value.
Definition: iteratorfacades.hh:1262
constexpr decltype(auto) operator--()
Predecrement operator.
Definition: iteratorfacades.hh:1169
constexpr reference operator[](difference_type n) const
Dereference element with given offset form this iterator.
Definition: iteratorfacades.hh:1207
constexpr const DerivedIterator & derived() const
Cast of *this to const DerivedIterator type.
Definition: iteratorfacades.hh:1068
friend constexpr DerivedIterator operator+(difference_type n, const IteratorFacade &it)
Create iterator incremented by given value.
Definition: iteratorfacades.hh:1249
constexpr decltype(auto) operator++()
Preincrement operator.
Definition: iteratorfacades.hh:1138
constexpr DerivedIterator operator-(difference_type n) const
Create iterator decremented by given value.
Definition: iteratorfacades.hh:1274
Helper to mimic a pointer for proxy objects.
Definition: iteratorfacades.hh:750
Base class for stl conformant forward iterators.
Definition: iteratorfacades.hh:435
DerivedType operator--(int)
Postdecrement operator.
Definition: iteratorfacades.hh:558
Reference operator*() const
Dereferencing operator.
Definition: iteratorfacades.hh:501
DerivedType & operator++()
Preincrement operator.
Definition: iteratorfacades.hh:522
D DifferenceType
The type of the difference between two positions.
Definition: iteratorfacades.hh:493
DerivedType & operator--()
Predecrement operator.
Definition: iteratorfacades.hh:551
Reference operator[](DifferenceType n) const
Get the element n positions from the current one.
Definition: iteratorfacades.hh:516
T DerivedType
The type of derived iterator.
Definition: iteratorfacades.hh:478
V * Pointer
The pointer to the Value.
Definition: iteratorfacades.hh:488
DerivedType operator++(int)
Postincrement operator.
Definition: iteratorfacades.hh:529
V Value
The type of value accessed through the iterator.
Definition: iteratorfacades.hh:483
R Reference
The type of the reference to the values accessed.
Definition: iteratorfacades.hh:498
Infrastructure for concepts.
Traits for type conversions and type information.
constexpr auto equals(T1 &&t1, T2 &&t2)
Equality comparison.
Definition: hybridutilities.hh:587
constexpr decltype(auto) elementAt(Container &&c, Index &&i)
Get element at given position from container.
Definition: hybridutilities.hh:126
EnableIfInterOperable< T1, T2, bool >::type operator<(const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
Comparison operator.
Definition: iteratorfacades.hh:638
EnableIfInterOperable< T1, T2, bool >::type operator>(const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
Comparison operator.
Definition: iteratorfacades.hh:684
EnableIfInterOperable< T1, T2, bool >::type operator<=(const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
Comparison operator.
Definition: iteratorfacades.hh:661
EnableIfInterOperable< T1, T2, bool >::type operator==(const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
Checks for equality.
Definition: iteratorfacades.hh:238
EnableIfInterOperable< T1, T2, bool >::type operator>=(const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs)
Comparison operator.
Definition: iteratorfacades.hh:706
EnableIfInterOperable< T1, T2, bool >::type operator!=(const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
Checks for inequality.
Definition: iteratorfacades.hh:260
Enable typedef if two types are interoperable.
Definition: typetraits.hh:81
This class encapsulates access of IteratorFacade.
Definition: iteratorfacades.hh:786
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 23, 23:29, 2024)