Lagrange
StackSet< T, N > Struct Template Reference

Stack-allocated set with a maximum size. More...

#include <lagrange/utils/StackSet.h>

Public Types

using iterator = typename std::array< T, N >::iterator
 
using const_iterator = typename std::array< T, N >::const_iterator
 

Public Member Functions

 StackSet (std::initializer_list< T > init)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
void clear ()
 
void resize (const size_t i)
 
std::pair< iterator, bool > insert (const T &v)
 
size_t erase (const T &v)
 
bool contains (const T &v) const
 
const_iterator find (const T &v) const
 
const T * data () const
 
const T & front () const
 
const T & back () const
 
const T & at (const size_t i) const
 
const T & operator[] (const size_t i) const
 
template<typename U , class UnaryOperation >
auto transformed (UnaryOperation op)
 
template<size_t D>
auto to_tuple ()
 

Protected Member Functions

template<size_t... Indices>
auto to_tuple_helper (std::index_sequence< Indices... >)
 
void ensure_unique ()
 
iterator find (const T &v)
 
T * data ()
 
T & front ()
 
T & back ()
 

Detailed Description

template<typename T, size_t N>
struct lagrange::StackSet< T, N >

Stack-allocated set with a maximum size.

Template Parameters
TValue type.
NMaximum size.

The documentation for this struct was generated from the following file: