std::vector related utility functions used in the ARA SDK.
|
Up-casting vectors of base class pointers to vectors of derived class pointers.
|
|
template<typename T , typename U , typename std::enable_if<(sizeof(T)==sizeof(U)) &&(std::is_convertible< T, U >::value||std::is_convertible< U, T >::value), bool >::type = true> |
| std::vector< T > & | ARA::vector_cast (std::vector< U > &container) noexcept |
| |
|
template<typename T , typename U , typename std::enable_if<(sizeof(T)==sizeof(U)) &&(std::is_convertible< T, U >::value||std::is_convertible< U, T >::value), bool >::type = true> |
| std::vector< T > const & | ARA::vector_cast (std::vector< U > const &container) noexcept |
| |
|
Find an element in the vector and, if found, erase it from the vector. Returns true if found & erased, otherwise false.
|
|
template<typename T , typename U , typename std::enable_if< std::is_convertible< T, U >::value||std::is_convertible< U, T >::value, bool >::type = true> |
| bool | ARA::find_erase (std::vector< T > &container, const U &element) noexcept |
| |
|
Determine if an element exists in a vector.
|
|
template<typename T , typename U , typename std::enable_if< std::is_convertible< T, U >::value||std::is_convertible< U, T >::value, bool >::type = true> |
| bool | ARA::contains (std::vector< T > const &container, const U &element) noexcept |
| |