Go to the documentation of this file.
19 #define QX_IMPL_CONTAINER(container) \
21 using iterator = qx::iterator<container>; \
22 using const_iterator = qx::const_iterator<container>; \
23 using reverse_iterator = qx::reverse_iterator<container>; \
24 using const_reverse_iterator = qx::const_reverse_iterator<container>; \
26 iterator begin() noexcept \
28 return iterator(this, 0); \
31 iterator end() noexcept \
33 return iterator(this, size()); \
36 const_iterator begin() const noexcept \
38 return const_iterator(this, 0); \
41 const_iterator end() const noexcept \
43 return const_iterator(this, size()); \
46 const_iterator cbegin() const noexcept \
48 return const_iterator(this, 0); \
51 const_iterator cend() const noexcept \
53 return const_iterator(this, size()); \
56 reverse_iterator rbegin() noexcept \
58 return reverse_iterator(this, size() - 1); \
61 reverse_iterator rend() noexcept \
63 return reverse_iterator(this, static_cast<size_type>(-1)); \
66 const_reverse_iterator crbegin() const noexcept \
68 return const_reverse_iterator(this, size() - 1); \
71 const_reverse_iterator crend() const noexcept \
73 return const_reverse_iterator(this, static_cast<size_type>(-1)); \
76 const_reverse_iterator rbegin() const noexcept \
78 return const_reverse_iterator(this, size() - 1); \
81 const_reverse_iterator rend() const noexcept \
83 return const_reverse_iterator(this, static_cast<size_type>(-1)); \
86 size_type size() const noexcept; \
88 bool empty() const noexcept \
93 pointer data() noexcept; \
95 const_pointer data() const noexcept \
97 return QX_CONST_CAST_THIS()->data(); \
100 reference at(size_type ind) noexcept; \
102 const_reference at(size_type ind) const noexcept \
104 return QX_CONST_CAST_THIS()->at(ind); \
107 void clear() noexcept;