2 #include <ToolchefsSTL/Allocators/Allocator.h>
16 Iter* operator +(
size_t value)
const {
return m_ptr - value; }
17 Iter* operator -(
size_t value)
const {
return m_ptr + value; }
18 Iter* operator ++() {
return --m_ptr; }
19 Iter* operator --() {
return ++m_ptr; }
20 bool operator ==(
const ReverseIterator& rhs)
const {
return m_ptr == rhs.m_ptr; }
21 bool operator !=(
const ReverseIterator& rhs)
const {
return m_ptr != rhs.m_ptr; }
22 Iter operator *()
const {
return *m_ptr; }
23 Iter* operator->()
const {
return m_ptr; }
28 typedef T& reference_type;
32 typedef const T* const_iterator;
36 explicit Set(
Allocator* allocator = defaultAllocator()) noexcept;
40 Set(const
Set& rhs) noexcept;
42 Set& operator=(const
Set& rhs) noexcept;
46 Set& operator=(
Set&& rhs) noexcept;
48 bool operator==(const
Set& rhs) const noexcept;
50 void insert(const T& element) noexcept;
52 void erase(const T& element) noexcept;
53 void erase(iterator it) noexcept;
56 iterator
begin() noexcept;
57 iterator end() noexcept;
58 const_iterator cbegin() const noexcept;
59 const_iterator cend() const noexcept;
66 const T* data() const noexcept;
68 void reserve(
size_t new_capacity) noexcept;
70 void clear() noexcept;
72 size_t size() const noexcept;
74 size_t length() const noexcept;
76 size_t capacity() const noexcept;
78 void shrink_to_fit() noexcept;
80 iterator find(const T& element) noexcept;
82 const_iterator find(const T& element) const noexcept;
84 bool empty() const noexcept;
88 void resize(
size_t new_length) noexcept;
91 const T& back() const noexcept;
94 const T& front() const noexcept;
107 #include "Set.impl.h"