Go to the documentation of this file.
8 #ifndef HERD_ARRAYFORWARDER_H_
9 #define HERD_ARRAYFORWARDER_H_
13 #include <type_traits>
18 #ifndef _GLIBCXX17_CONSTEXPR
19 #if __cplusplus >= 201703L
20 #define _GLIBCXX17_CONSTEXPR constexpr
22 #define _GLIBCXX17_CONSTEXPR
51 template <
typename _Tp, std::
size_t _Nm>
56 template <
typename _Tp, std::
size_t _Nm>
58 return !(__one == __two);
61 template <
typename _Tp, std::
size_t _Nm>
67 template <
typename _Tp, std::
size_t _Nm>
72 template <
typename _Tp, std::
size_t _Nm>
74 return !(__one > __two);
77 template <
typename _Tp, std::
size_t _Nm>
79 return !(__one < __two);
82 template <
typename _Tp, std::
size_t _Nm>
struct ArrayForwarder {
105 #if __cplusplus >= 201703L
106 void swap(
ArrayForwarder &__other) noexcept(std::__is_nothrow_swappable<_Tp>::value) {
111 std::swap_ranges(
_content.begin(),
_content.end(), __other._content.begin());
145 [[nodiscard]] constexpr
bool empty() const noexcept {
return _content.empty(); }
181 template <
typename _Tp, std::
size_t _Nm>
183 #if __cplusplus > 201402L // c++1z
185 typename std::enable_if<std::__is_swappable<_Tp>::value>::type
193 #if __cplusplus > 201402L // c++1z
194 template <
typename _Tp, std::
size_t _Nm>
195 typename std::enable_if<!std::__is_swappable<_Tp>::value>::type
swap(ArrayForwarder<_Tp, _Nm> &,
196 ArrayForwarder<_Tp, _Nm> &) =
delete;
199 template <std::
size_t _Int,
typename _Tp, std::
size_t _Nm>
201 return std::get<_Int, _Tp, _Nm>(__arr._content);
204 template <std::
size_t _Int,
typename _Tp, std::
size_t _Nm>
206 return std::get<_Int, _Tp, _Nm>(std::move(__arr._content));
209 template <std::
size_t _Int,
typename _Tp, std::
size_t _Nm>
211 return std::get<_Int, _Tp, _Nm>(__arr._content);
214 template <std::
size_t _Int,
typename _Tp, std::
size_t _Nm>
216 return std::get<_Int, _Tp, _Nm>(std::move(__arr._content));
_GLIBCXX17_CONSTEXPR const_reverse_iterator rbegin() const noexcept
Definition: ArrayForwarder.h:126
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: ArrayForwarder.h:94
void fill(const value_type &__u)
Definition: ArrayForwarder.h:103
bool operator==(const HoughTrackStub &lhs, const HoughTrackStub &rhs)
Definition: HoughTrackStub.h:41
std::size_t size_type
Definition: ArrayForwarder.h:91
constexpr const_reference at(size_type __n) const
Definition: ArrayForwarder.h:154
constexpr const_reference operator[](size_type __n) const noexcept
Definition: ArrayForwarder.h:150
std::array< _Tp, _Nm > _content
Definition: ArrayForwarder.h:169
bool operator!=(const ArrayForwarder< _Tp, _Nm > &__one, const ArrayForwarder< _Tp, _Nm > &__two)
Definition: ArrayForwarder.h:57
_GLIBCXX17_CONSTEXPR iterator end() noexcept
Definition: ArrayForwarder.h:120
constexpr const_reference front() const noexcept
Definition: ArrayForwarder.h:158
const typedef value_type * const_iterator
Definition: ArrayForwarder.h:90
void swap(ArrayForwarder &__other) noexcept(noexcept(std::swap(std::declval< _Tp & >(), std::declval< _Tp & >())))
Definition: ArrayForwarder.h:110
_GLIBCXX17_CONSTEXPR iterator begin() noexcept
Definition: ArrayForwarder.h:116
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:22
const typedef value_type & const_reference
Definition: ArrayForwarder.h:88
_GLIBCXX17_CONSTEXPR reference at(size_type __n)
Definition: ArrayForwarder.h:152
std::reverse_iterator< iterator > reverse_iterator
Definition: ArrayForwarder.h:93
void swap(ArrayForwarder< _Tp, _Nm > &__one, ArrayForwarder< _Tp, _Nm > &__two) noexcept(noexcept(__one.swap(__two)))
Definition: ArrayForwarder.h:189
_GLIBCXX17_CONSTEXPR const_iterator begin() const noexcept
Definition: ArrayForwarder.h:118
value_type & reference
Definition: ArrayForwarder.h:87
_GLIBCXX17_CONSTEXPR const_iterator cbegin() const noexcept
Definition: ArrayForwarder.h:132
_GLIBCXX17_CONSTEXPR const_reverse_iterator crend() const noexcept
Definition: ArrayForwarder.h:138
_GLIBCXX17_CONSTEXPR const_reverse_iterator crbegin() const noexcept
Definition: ArrayForwarder.h:136
bool operator<(const ArrayForwarder< _Tp, _Nm > &__a, const ArrayForwarder< _Tp, _Nm > &__b)
Definition: ArrayForwarder.h:62
constexpr const_reference back() const noexcept
Definition: ArrayForwarder.h:162
value_type * pointer
Definition: ArrayForwarder.h:85
bool operator>=(const ArrayForwarder< _Tp, _Nm > &__one, const ArrayForwarder< _Tp, _Nm > &__two)
Definition: ArrayForwarder.h:78
constexpr ArrayForwarder(std::array< _Tp, _Nm > arr)
Definition: ArrayForwarder.h:98
constexpr bool empty() const noexcept
Definition: ArrayForwarder.h:145
#define _GLIBCXX17_CONSTEXPR
Definition: ArrayForwarder.h:22
constexpr size_type max_size() const noexcept
Definition: ArrayForwarder.h:143
std::ptrdiff_t difference_type
Definition: ArrayForwarder.h:92
_GLIBCXX17_CONSTEXPR const_reverse_iterator rend() const noexcept
Definition: ArrayForwarder.h:130
_GLIBCXX17_CONSTEXPR const_iterator end() const noexcept
Definition: ArrayForwarder.h:122
bool operator<=(const ArrayForwarder< _Tp, _Nm > &__one, const ArrayForwarder< _Tp, _Nm > &__two)
Definition: ArrayForwarder.h:73
constexpr _Tp & get(ArrayForwarder< _Tp, _Nm > &__arr) noexcept
Definition: ArrayForwarder.h:200
_GLIBCXX17_CONSTEXPR reference back() noexcept
Definition: ArrayForwarder.h:160
_Tp value_type
Definition: ArrayForwarder.h:84
_GLIBCXX17_CONSTEXPR reverse_iterator rend() noexcept
Definition: ArrayForwarder.h:128
A forwarder class for std::array.
Definition: ArrayForwarder.h:48
constexpr size_type size() const noexcept
Definition: ArrayForwarder.h:141
_GLIBCXX17_CONSTEXPR reverse_iterator rbegin() noexcept
Definition: ArrayForwarder.h:124
_GLIBCXX17_CONSTEXPR reference front() noexcept
Definition: ArrayForwarder.h:156
bool operator>(const ArrayForwarder< _Tp, _Nm > &__one, const ArrayForwarder< _Tp, _Nm > &__two)
Definition: ArrayForwarder.h:68
_GLIBCXX17_CONSTEXPR const_iterator cend() const noexcept
Definition: ArrayForwarder.h:134
_GLIBCXX17_CONSTEXPR reference operator[](size_type __n) noexcept
Definition: ArrayForwarder.h:148
_GLIBCXX17_CONSTEXPR pointer data() noexcept
Definition: ArrayForwarder.h:164
value_type * iterator
Definition: ArrayForwarder.h:89
constexpr ArrayForwarder()=default
_GLIBCXX17_CONSTEXPR const_pointer data() const noexcept
Definition: ArrayForwarder.h:166
const typedef value_type * const_pointer
Definition: ArrayForwarder.h:86