9#ifndef SL3_CONTAINER_HPP_
10#define SL3_CONTAINER_HPP_
12#include <sl3/error.hpp>
32 using conatiner_type = ContainerType;
33 using iterator =
typename conatiner_type::iterator;
34 using const_iterator =
typename conatiner_type::const_iterator;
35 using value_type =
typename conatiner_type::value_type;
36 using reference =
typename conatiner_type::reference;
37 using const_reference =
typename conatiner_type::const_reference;
38 using size_type =
typename conatiner_type::size_type;
39 using container_type = ContainerType;
55 std::is_nothrow_move_constructible<ContainerType>::value)
56 :
_cont (std::move (container))
65 Container (std::initializer_list<value_type> container)
85 std::is_nothrow_move_constructible<ContainerType>::value)
98 std::is_nothrow_destructible<ContainerType>::value)
108 return std::begin (
_cont);
118 return _cont.cbegin ();
128 return std::end (
_cont);
138 return _cont.cend ();
148 return _cont.cbegin ();
158 return _cont.cend ();
170 return _cont.size ();
Wrapper to provide begin, end and random access of a container.
Definition: container.hpp:29
const_iterator begin() const
Iterator access.
Definition: container.hpp:116
Container(Container &&) noexcept(std::is_nothrow_move_constructible< ContainerType >::value)=default
Move constructor.
Container(ContainerType container) noexcept(std::is_nothrow_move_constructible< ContainerType >::value)
Constructor.
Definition: container.hpp:54
size_type size() const
Container size.
Definition: container.hpp:168
const_reference at(size_t i) const
checked random access
Definition: container.hpp:198
const_iterator end() const
Iterator access.
Definition: container.hpp:136
ContainerType _cont
Container T.
Definition: container.hpp:233
const_iterator cbegin() const
Iterator access.
Definition: container.hpp:146
iterator end()
Iterator access.
Definition: container.hpp:126
Container(std::initializer_list< value_type > container)
Constructor.
Definition: container.hpp:65
Container(const Container &)=default
Copy Constructor.
Container() noexcept
Constructor.
Definition: container.hpp:48
reference operator[](size_t i)
unchecked random access
Definition: container.hpp:216
reference at(size_t i)
checked random access
Definition: container.hpp:179
Container & operator=(const Container &)=default
Assignment.
const_iterator cend() const
Iterator access.
Definition: container.hpp:156
iterator begin()
Iterator access.
Definition: container.hpp:106
Namespace of libSL3.
Definition: columns.hpp:18
ErrType< ErrCode::OutOfRange > ErrOutOfRange
thrown if an index op is out of range
Definition: error.hpp:111