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

Go to the source code of this file.

Classes

class  hxarray< T, capacity_ >

Concepts

concept  hxarray_concept_

Functions

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

Detailed Description

Implements std::array with a few things added and a few unimplemented.

Function Documentation

◆ hxkey_equal()

template<typename T, hxsize_t capacity_>
bool hxkey_equal ( const hxarray< T, capacity_ > & x_,
const hxarray< T, capacity_ > & y_ )
inline

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

◆ hxkey_less()

template<typename T, hxsize_t capacity_>
bool hxkey_less ( const hxarray< T, capacity_ > & x_,
const hxarray< T, capacity_ > & y_ )
inline

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

◆ hxswap()

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

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

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