Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::inline_deque< T, Capacity > Class Template Reference

A container with fixed capacity featuring constant time insertion and removal at opposite ends; i.e., with an interface similar to std::deque. The storage for the elements is held directly within the class. Any attempt to store more than Capacity elements is an ARENE_PRECONDITION violation. More...

Inheritance diagram for arene::base::inline_deque< T, Capacity >:
Inheritance graph

Public Member Functions

constexpr inline_deque () noexcept
 Construct an empty queue.
 
template<typename Iterator, constraints< std::enable_if_t< arene::base::is_forward_iterator_v< Iterator > >, std::enable_if_t< std::is_constructible< value_type, typename std::iterator_traits< Iterator >::reference >::value > > = nullptr>
constexpr inline_deque (Iterator in_begin, Iterator in_end) noexcept(noexcept(::arene::base::distance(in_begin, in_end)) &&std::is_nothrow_constructible< value_type, typename std::iterator_traits< Iterator >::reference >::value)
 Construct a queue from a range of elements, taken to be in front -> back order.
 
template<typename U = value_type, constraints< std::enable_if_t< std::is_copy_constructible< U >::value > > = nullptr>
constexpr inline_deque (std::initializer_list< value_type > init) noexcept(noexcept(inline_deque(init.begin(), init.end())))
 Construct a deque by copying from an initializer list of elements, taken to be in front -> back order.
 

Detailed Description

template<typename T, std::size_t Capacity>
class arene::base::inline_deque< T, Capacity >

A container with fixed capacity featuring constant time insertion and removal at opposite ends; i.e., with an interface similar to std::deque. The storage for the elements is held directly within the class. Any attempt to store more than Capacity elements is an ARENE_PRECONDITION violation.

Template Parameters
TThe type of each element
CapacityThe maximum number of elements that can be stored

Constructor & Destructor Documentation

◆ inline_deque() [1/3]

template<typename T, std::size_t Capacity>
arene::base::inline_deque< T, Capacity >::inline_deque ( )
inlineconstexprnoexcept

Construct an empty queue.

◆ inline_deque() [2/3]

template<typename T, std::size_t Capacity>
template<typename Iterator, constraints< std::enable_if_t< arene::base::is_forward_iterator_v< Iterator > >, std::enable_if_t< std::is_constructible< value_type, typename std::iterator_traits< Iterator >::reference >::value > > = nullptr>
arene::base::inline_deque< T, Capacity >::inline_deque ( Iterator in_begin,
Iterator in_end )
inlineconstexprnoexcept

Construct a queue from a range of elements, taken to be in front -> back order.

Template Parameters
IteratorThe type of the iterators to construct from
Parameters
in_beginAn iterator to the beginning (front) of the input range
in_endAn iterator to the end (back+1) of the input range
Precondition
distance(in_begin, in_end) >= 0 and <= capacity(), otherwise ARENE_PRECONDITION violation
If the behaviour of distance(in_begin, in_end) is undefined, then this function's behaviour is too

◆ inline_deque() [3/3]

template<typename T, std::size_t Capacity>
template<typename U = value_type, constraints< std::enable_if_t< std::is_copy_constructible< U >::value > > = nullptr>
arene::base::inline_deque< T, Capacity >::inline_deque ( std::initializer_list< value_type > init)
inlineconstexprnoexcept

Construct a deque by copying from an initializer list of elements, taken to be in front -> back order.

Parameters
initAn initializer list of the value type
Precondition
init.size() <= capacity(), otherwise ARENE_PRECONDITION violation

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