DNA Calib 1.1
Project brief
Classes | Typedefs | Functions
trust Namespace Reference

Classes

class  ArrayView
 A view over a continuous sequence of objects. More...
 
struct  ArrayViewTraits
 
struct  ArrayViewTraits< const T >
 

Typedefs

template<typename T >
using ConstArrayView = ArrayView< const T >
 

Functions

template<typename T , typename U >
bool operator== (const ArrayView< T > &lhs, const ArrayView< U > &rhs)
 
template<typename T , typename U >
bool operator!= (const ArrayView< T > &lhs, const ArrayView< U > &rhs)
 
template<typename T , typename TContainer >
bool operator== (const ArrayView< T > &lhs, const TContainer &rhs)
 
template<typename T , typename TContainer >
bool operator!= (const ArrayView< T > &lhs, const TContainer &rhs)
 
template<typename T , typename TContainer >
bool operator== (const TContainer &lhs, const ArrayView< T > &rhs)
 
template<typename T , typename TContainer >
bool operator!= (const TContainer &lhs, const ArrayView< T > &rhs)
 

Typedef Documentation

◆ ConstArrayView

template<typename T >
using trust::ConstArrayView = typedef ArrayView<const T>

Function Documentation

◆ operator!=() [1/3]

template<typename T , typename U >
bool trust::operator!= ( const ArrayView< T > &  lhs,
const ArrayView< U > &  rhs 
)
191 {
192 return !(lhs == rhs);
193}

◆ operator!=() [2/3]

template<typename T , typename TContainer >
bool trust::operator!= ( const ArrayView< T > &  lhs,
const TContainer &  rhs 
)
210 {
211 return !(lhs == rhs);
212}

◆ operator!=() [3/3]

template<typename T , typename TContainer >
bool trust::operator!= ( const TContainer &  lhs,
const ArrayView< T > &  rhs 
)
220 {
221 return !(lhs == rhs);
222}

◆ operator==() [1/3]

template<typename T , typename U >
bool trust::operator== ( const ArrayView< T > &  lhs,
const ArrayView< U > &  rhs 
)
174 {
175 if (lhs.size() != rhs.size()) {
176 return false;
177 }
178 if (lhs.data() == rhs.data()) {
179 return true;
180 }
181 #if __cplusplus >= 201402L || (defined(_MSC_VER) && _MSC_VER >= 1900)
182 // Under Visual Studio 2015, the overload of std::equal accepting 4 parameters must be used,
183 // because the 3-parameter version causes insuppressible warnings
184 return std::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
185 #else
186 return std::equal(lhs.begin(), lhs.end(), rhs.begin());
187 #endif
188}
pointer data()
Definition: ArrayView.h:102
pointer end()
Definition: ArrayView.h:114
pointer begin()
Definition: ArrayView.h:110
size_type size() const
Definition: ArrayView.h:98

References trust::ArrayView< T >::begin(), trust::ArrayView< T >::data(), trust::ArrayView< T >::end(), and trust::ArrayView< T >::size().

◆ operator==() [2/3]

template<typename T , typename TContainer >
bool trust::operator== ( const ArrayView< T > &  lhs,
const TContainer &  rhs 
)
196 {
197 if (lhs.size() != rhs.size()) {
198 return false;
199 }
200 #if __cplusplus >= 201402L || (defined(_MSC_VER) && _MSC_VER >= 1900)
201 // Under Visual Studio 2015, the overload of std::equal accepting 4 parameters must be used,
202 // because the 3-parameter version causes insuppressible warnings
203 return std::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
204 #else
205 return std::equal(lhs.begin(), lhs.end(), rhs.begin());
206 #endif
207}

References trust::ArrayView< T >::begin(), trust::ArrayView< T >::end(), and trust::ArrayView< T >::size().

◆ operator==() [3/3]

template<typename T , typename TContainer >
bool trust::operator== ( const TContainer &  lhs,
const ArrayView< T > &  rhs 
)
215 {
216 return (rhs == lhs);
217}