Library of Assembled Shared Sources
lass::stde::static_vector< T, maxsize > Class Template Reference

it looks like a vector, it smells like a vector, but it only uses a fixed amout of memory More...

#include <static_vector.h>

Related Symbols

(Note that these are not member symbols.)

template<typename T, size_t maxsize>
bool operator== (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b)
 returns wether a and b are lexicographical idential.
 
template<typename T, size_t maxsize>
bool operator!= (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b)
 returns wether a and b are not lexicographical idential.
 
template<typename T, size_t maxsize>
bool operator< (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b)
 returns wether a is lexicographical less than b.
 
template<typename T, size_t maxsize>
bool operator> (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b)
 returns wether b is lexicographical less than a.
 
template<typename T, size_t maxsize>
bool operator<= (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b)
 returns wether a is lexicographical less or equal to b.
 
template<typename T, size_t maxsize>
bool operator>= (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b)
 returns wether b is lexicographical less or equal to a.
 
template<typename T, size_t maxsize, typename Char, typename Traits>
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &ostream, const static_vector< T, maxsize > &container)
 writes static_vector to output stream.
 
template<typename T, size_t maxsize, typename Char, typename Traits>
std::basic_istream< Char, Traits > & operator>> (std::basic_istream< Char, Traits > &istream, static_vector< T, maxsize > &container)
 reads list from stream.
 

Detailed Description

template<typename T, size_t maxsize>
class lass::stde::static_vector< T, maxsize >

it looks like a vector, it smells like a vector, but it only uses a fixed amout of memory

Author
Bram de Greve [Bramz]

Definition at line 64 of file static_vector.h.

Friends And Related Symbol Documentation

◆ operator==()

template<typename T, size_t maxsize>
bool operator== ( const static_vector< T, maxsize > & a,
const static_vector< T, maxsize > & b )
related

returns wether a and b are lexicographical idential.

Parameters
afirst static_vector
bsecond static_vector

returns true if a.size() == b.size() and each element of is considered equal to its corresponding element in b by using operator==

@complexity O(N) with N = a.size() == b.size() ? a.size() : 1

Definition at line 761 of file static_vector.inl.

◆ operator!=()

template<typename T, size_t maxsize>
bool operator!= ( const static_vector< T, maxsize > & a,
const static_vector< T, maxsize > & b )
related

returns wether a and b are not lexicographical idential.

Parameters
afirst static_vector
bsecond static_vector

Is equivalent to !(a == b)

@complexity O(N) with N = a.size() == b.size() ? a.size() : 1

Definition at line 792 of file static_vector.inl.

◆ operator<()

template<typename T, size_t maxsize>
bool operator< ( const static_vector< T, maxsize > & a,
const static_vector< T, maxsize > & b )
related

returns wether a is lexicographical less than b.

Parameters
afirst static_vector
bsecond static_vector

returns true if for the first difference between a and b the element of a is less than the corresponding one of b. In case no different elements between and b can be found, it returns true if a.size() < b.size()

@complexity O(N) with N = std::min(a.size(), b.size())

Definition at line 812 of file static_vector.inl.

◆ operator>()

template<typename T, size_t maxsize>
bool operator> ( const static_vector< T, maxsize > & a,
const static_vector< T, maxsize > & b )
related

returns wether b is lexicographical less than a.

Parameters
afirst static_vector
bsecond static_vector

Is equivalent to (b < a)

@complexity O(N) with N = std::min(a.size(), b.size())

Definition at line 844 of file static_vector.inl.

◆ operator<=()

template<typename T, size_t maxsize>
bool operator<= ( const static_vector< T, maxsize > & a,
const static_vector< T, maxsize > & b )
related

returns wether a is lexicographical less or equal to b.

Parameters
afirst static_vector
bsecond static_vector

Is equivalent to !(b < a)

@complexity O(N) with N = std::min(a.size(), b.size())

Definition at line 862 of file static_vector.inl.

◆ operator>=()

template<typename T, size_t maxsize>
bool operator>= ( const static_vector< T, maxsize > & a,
const static_vector< T, maxsize > & b )
related

returns wether b is lexicographical less or equal to a.

Parameters
afirst static_vector
bsecond static_vector

Is equivalent to !(a < b)

@complexity O(N) with N = std::min(a.size(), b.size())

Definition at line 880 of file static_vector.inl.

Referenced by operator<<().

◆ operator<<()

template<typename T, size_t maxsize, typename Char, typename Traits>
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > & ostream,
const static_vector< T, maxsize > & container )
related

writes static_vector to output stream.

Parameters
ostreamshould be a good stream.
containerstatic_vector to be written as [foo, bar, spam, ham]

complexity: O(N) with N = container.size()

Definition at line 880 of file static_vector.inl.

References operator>=().

◆ operator>>()

template<typename T, size_t maxsize, typename Char, typename Traits>
std::basic_istream< Char, Traits > & operator>> ( std::basic_istream< Char, Traits > & istream,
static_vector< T, maxsize > & container )
related

reads list from stream.

Parameters
istreamshould be a good stream.
containerstatic_vector to be read as [foo, bar, spam, ham]

complexity: O(N) with N = number of elements to be read.

Precondition
maxsize should be large enough to read all elements

Definition at line 918 of file static_vector.inl.


The documentation for this class was generated from the following files: