18 #ifndef itkVectorContainer_h
19 #define itkVectorContainer_h
24 #include <type_traits>
50 template <
typename TElementIdentifier,
typename TElement>
53 ,
private std::vector<TElement>
94 const STLContainerType &
100 using STLContainerType::begin;
101 using STLContainerType::end;
102 using STLContainerType::rbegin;
103 using STLContainerType::rend;
104 using STLContainerType::cbegin;
105 using STLContainerType::cend;
106 using STLContainerType::crbegin;
107 using STLContainerType::crend;
109 using STLContainerType::size;
110 using STLContainerType::max_size;
111 using STLContainerType::resize;
112 using STLContainerType::capacity;
113 using STLContainerType::empty;
114 using STLContainerType::reserve;
115 using STLContainerType::shrink_to_fit;
117 using STLContainerType::operator[];
118 using STLContainerType::at;
119 using STLContainerType::front;
120 using STLContainerType::back;
122 using STLContainerType::assign;
123 using STLContainerType::push_back;
124 using STLContainerType::pop_back;
125 using STLContainerType::insert;
126 using STLContainerType::erase;
128 using STLContainerType::clear;
130 using STLContainerType::get_allocator;
132 using typename STLContainerType::reference;
133 using typename STLContainerType::const_reference;
134 using typename STLContainerType::iterator;
135 using typename STLContainerType::const_iterator;
136 using typename STLContainerType::size_type;
137 using typename STLContainerType::difference_type;
138 using typename STLContainerType::value_type;
139 using typename STLContainerType::allocator_type;
140 using typename STLContainerType::pointer;
141 using typename STLContainerType::const_pointer;
142 using typename STLContainerType::reverse_iterator;
143 using typename STLContainerType::const_reverse_iterator;
160 using pointer =
typename VectorIterator::pointer;
204 return static_cast<difference_type>(this->m_Pos) - static_cast<difference_type>(r.
m_Pos);
210 return m_Iter == r.
m_Iter;
213 ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(
Iterator);
218 return m_Iter == r.
m_Iter;
226 return (this->
operator-(r)) < 0;
257 return static_cast<ElementIdentifier>(m_Pos);
284 using pointer =
typename VectorConstIterator::pointer;
285 using reference =
typename VectorConstIterator::reference;
346 return static_cast<difference_type>(m_Pos) - static_cast<difference_type>(r.
m_Pos);
352 return m_Iter == r.
m_Iter;
355 ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(
Iterator);
360 return m_Iter == r.
m_Iter;
368 return (this->
operator-(r) < 0);
392 return static_cast<ElementIdentifier>(m_Pos);
562 template <
typename TInputIterator>
582 template <
typename T1,
typename T2 =
void>
584 std::conditional_t<std::is_void_v<T2>, T1, T2>>;
588 template <
typename TElement>
593 vectorContainer->CastToSTLContainer() = std::move(stdVector);
594 return vectorContainer;
600 #ifndef ITK_MANUAL_INSTANTIATION
601 # include "itkVectorContainer.hxx"