libhatchet
Loading...
Searching...
No Matches
hxvector.hpp File Reference

Go to the source code of this file.

Classes

class  hxvector< T, capacity_ >

Concepts

concept  hxvector_concept_

Functions

template<typename T, hxsize_t capacity_x_, hxsize_t capacity_y_>
bool hxkey_equal (const hxvector< T, capacity_x_ > &x_, const hxvector< T, capacity_y_ > &y_)
template<typename T, hxsize_t capacity_x_, hxsize_t capacity_y_>
bool hxkey_less (const hxvector< T, capacity_x_ > &x_, const hxvector< T, capacity_y_ > &y_)
template<typename T>
void hxswap (hxvector< T, hxallocator_dynamic_capacity > &x_, hxvector< T, hxallocator_dynamic_capacity > &y_) noexcept

Detailed Description

Implements std::vector, std::inplace_vector and std::back_insert_iterator with a few things added and a few things unimplemented.

Function Documentation

◆ hxkey_equal()

template<typename T, hxsize_t capacity_x_, hxsize_t capacity_y_>
bool hxkey_equal ( const hxvector< T, capacity_x_ > & x_,
const hxvector< T, capacity_y_ > & y_ )
inline

bool hxkey_equal(hxvector<T>& x, hxvector<T>& y) - Compares the contents of x and y for equivalence.

◆ hxkey_less()

template<typename T, hxsize_t capacity_x_, hxsize_t capacity_y_>
bool hxkey_less ( const hxvector< T, capacity_x_ > & x_,
const hxvector< T, capacity_y_ > & y_ )
inline

bool hxkey_less(hxvector<T>& x, hxvector<T>& y) - Compares the contents of x and y lexicographically using hxkey_equal and hxkey_less on each element.

◆ hxswap()

template<typename T>
void hxswap ( hxvector< T, hxallocator_dynamic_capacity > & x_,
hxvector< T, hxallocator_dynamic_capacity > & y_ )
inlinenoexcept

void hxswap(hxvector<T>& x, hxvector<T>& y) - Exchanges the contents of x and y.

Only works with hxallocator_dynamic_capacity. Dynamically allocated arrays are swapped with very little overhead.