5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_INLINE_CONTAINER_CIRCULAR_BUFFER_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_INLINE_CONTAINER_CIRCULAR_BUFFER_HPP_
10#include "arene/base/inline_container/detail/try_construct_interface.hpp"
12#include "arene/base/stdlib_choice/cstddef.hpp"
13#include "arene/base/stdlib_choice/enable_if.hpp"
14#include "arene/base/stdlib_choice/initializer_list.hpp"
15#include "arene/base/stdlib_choice/is_constructible.hpp"
16#include "arene/base/stdlib_choice/is_copy_constructible.hpp"
17#include "arene/base/stdlib_choice/iterator_traits.hpp"
32template <
typename T, std::
size_t Capacity>
34 :
private inline_deque_detail::inline_deque_impl<T, Capacity, true>
35 ,
public inline_container_detail::try_construct_interface<
36 circular_buffer<T, Capacity>,
37 typename inline_deque_detail::inline_deque_try_construct_policy<T, Capacity>> {
39 using impl = inline_deque_detail::inline_deque_impl<T, Capacity, true>;
42 using try_construct_interface = inline_container_detail::try_construct_interface<
44 typename inline_deque_detail::inline_deque_try_construct_policy<T, Capacity>>;
50 using typename impl::const_reference;
54 using typename impl::reference;
56 using typename impl::size_type;
58 using typename impl::value_type;
61 using impl::wrapping_allowed;
68 try_construct_interface(this) {}
88 : impl(in_begin, in_end),
89 try_construct_interface(this) {}
95 template <typename U = value_type, constraints<std::enable_if_t<std::is_copy_constructible<U>::value>> =
nullptr>
102 using impl::capacity;
130 using impl::operator[];
133 using impl::emplace_back;
135 using impl::pop_front;
137 using impl::push_back;
constexpr auto cend() const noexcept -> const_iterator
Definition array.hpp:201
constexpr auto end() noexcept -> iterator
Definition array.hpp:163
constexpr auto back() noexcept -> T &
Definition array.hpp:284
detail::wrapped_iterator< const_pointer, array_detail::array_iter_passkey > const_iterator
Definition array.hpp:107
constexpr auto rbegin() noexcept -> reverse_iterator
Definition array.hpp:181
constexpr auto front() noexcept -> T &
Definition array.hpp:274
detail::wrapped_iterator< pointer, array_detail::array_iter_passkey > iterator
Definition array.hpp:105
constexpr auto crend() const noexcept -> const_reverse_iterator
Definition array.hpp:209
constexpr auto cbegin() const noexcept -> const_iterator
Definition array.hpp:197
constexpr auto crbegin() const noexcept -> const_reverse_iterator
Definition array.hpp:205
constexpr auto rend() noexcept -> reverse_iterator
Definition array.hpp:185
constexpr auto begin() noexcept -> iterator
Definition array.hpp:158
constexpr circular_buffer(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.
Definition circular_buffer.hpp:84
constexpr circular_buffer(std::initializer_list< value_type > init) noexcept(noexcept(circular_buffer(init.begin(), init.end())))
Construct a queue by copying from an initializer list of elements, taken to be in front -> back order...
Definition circular_buffer.hpp:96
constexpr circular_buffer() noexcept
Construct an empty queue.
Definition circular_buffer.hpp:66
Implementation of std::initializer_list for brace initialization.
Definition initializer_list.hpp:21
Type trait to detect if a type is constructible from arguments of the specified types.
Definition is_constructible.hpp:29
Type trait to detect if a type is constructible from arguments of the specified types and is noexcept...
Definition is_constructible.hpp:84
Definition accumulate.hpp:37
constexpr auto distance(Iterator first, Iterator last) noexcept(noexcept(distance_impl::do_distance(first, last, typename std::iterator_traits< Iterator >::iterator_category{}))) -> typename std::iterator_traits< Iterator >::difference_type
Find the number of elements between first and last.
Definition distance.hpp:79
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
Definition accumulate.hpp:36
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41