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;
212 return static_cast<difference_type>(this->m_Pos) - static_cast<difference_type>(r.
m_Pos);
218 return m_Iter == r.
m_Iter;
221 ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(
Iterator);
226 return m_Iter == r.
m_Iter;
234 return (this->
operator-(r)) < 0;
265 return static_cast<ElementIdentifier>(m_Pos);
292 using pointer =
typename VectorConstIterator::pointer;
293 using reference =
typename VectorConstIterator::reference;
362 return static_cast<difference_type>(m_Pos) - static_cast<difference_type>(r.
m_Pos);
368 return m_Iter == r.
m_Iter;
371 ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(
Iterator);
376 return m_Iter == r.
m_Iter;
384 return (this->
operator-(r) < 0);
408 return static_cast<ElementIdentifier>(m_Pos);
578 template <
typename TInputIterator>
598 template <
typename T1,
typename T2 =
void>
600 std::conditional_t<std::is_void_v<T2>, T1, T2>>;
604 template <
typename TElement>
609 vectorContainer->CastToSTLContainer() = std::move(stdVector);
610 return vectorContainer;
616 #ifndef ITK_MANUAL_INSTANTIATION
617 # include "itkVectorContainer.hxx"