template<
typename It>
requires (IsAnyPointer<
typename std::iterator_traits<
It>::value_type>)
class vcl::ConstPointerIterator< It >
The ConstPointerIterator class is a utility class that wraps an iterator of a container of [shared] pointers, and returns a const [shared] pointer when dereferencing the iterator.
This iterator is useful in a context where you manage a container of pointers having two iterators:
- iterator: it allows to modify the pointed objects (not the pointers!)
- const_iterator: it allows to iterate over the container without modifying the pointed objects. In this scenario, the iterator is easy to define (it is generally an alias to the container's const_iterator), while the const_iterator is a bit more tricky to define. This class allows to define easily the const_iterator:
using const_iterator =
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
- Template Parameters
-