GDBserver

Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
gdb::array_view< T > Class Template Reference

`#include "array-view.h"`

## Public Types
using | value_type = T
using | reference = T &
using | const_reference = const T &
using | size_type = size_t

## Public Member Functions
constexpr | array_view () noexcept
template<typename U , typename = Requires<DecayedConvertible<U>>>
constexpr | array_view (U &elem) noexcept
template<typename U , typename = Requires<DecayedConvertible<U>>>
constexpr | array_view (U &&elem) noexcept
template<typename U , typename = Requires<DecayedConvertible<U>>>
constexpr | array_view (U *array, size_t size) noexcept
template<typename U , typename V , typename = Requires<DecayedConvertible<U>>, typename = Requires<DecayedConvertible<V>>>
constexpr | array_view (U *begin, V *end) noexcept
template<typename U , size_t Size, typename = Requires<DecayedConvertible<U>>>
constexpr | array_view (U(&array)[Size]) noexcept
template<typename Container , typename = Requires<gdb::Not<IsDecayedT<Container>>>, typename = Requires<std::is_convertible <decltype (std::declval<Container> ().data ()), T *>>, typename = Requires<std::is_convertible <decltype (std::declval<Container> ().size ()), size_type>>>
constexpr | array_view (Container &&c) noexcept
T * | data () noexcept
constexpr const T * | data () const noexcept
T * | begin () noexcept
constexpr const T * | begin () const noexcept
T * | end () noexcept
constexpr const T * | end () const noexcept
reference | operator[] (size_t index) noexcept
constexpr const_reference | operator[] (size_t index) const noexcept
constexpr size_type | size () const noexcept
constexpr bool | empty () const noexcept

## Private Types
template<typename U >
using | IsDecayedT = typename std::is_same< typename std::decay< T >::type, typename std::decay< U >::type >
template<typename U >
using | DecayedConvertible = gdb::And< IsDecayedT< U >, std::is_convertible< U *, T * > >

## Private Attributes
T * | m_array
size_type | m_size

## Detailed Description

### template<typename T>
class gdb::array_view< T >

Definition at line 69 of file array-view.h.

## Member Typedef Documentation

## ◆ const_reference

template<typename T >

using gdb::array_view< T >::const_reference = const T &

Definition at line 87 of file array-view.h.

## ◆ DecayedConvertible

template<typename T >
template<typename U >

using gdb::array_view< T >::DecayedConvertible = gdb::And<IsDecayedT<U>, std::is_convertible<U *, T *> >
| private

Definition at line 82 of file array-view.h.

## ◆ IsDecayedT

template<typename T >
template<typename U >

using gdb::array_view< T >::IsDecayedT = typename std::is_same<typename std::decay<T>::type, typename std::decay<U>::type>
| private

Definition at line 75 of file array-view.h.

## ◆ reference

template<typename T >

using gdb::array_view< T >::reference = T &

Definition at line 86 of file array-view.h.

## ◆ size_type

template<typename T >

using gdb::array_view< T >::size_type = size_t

Definition at line 88 of file array-view.h.

## ◆ value_type

template<typename T >

using gdb::array_view< T >::value_type = T

Definition at line 85 of file array-view.h.

## Constructor & Destructor Documentation

## ◆ array_view() [1/7]

template<typename T >

constexpr gdb::array_view< T >::array_view | ( |  | ) |
| inline noexcept

Definition at line 91 of file array-view.h.

## ◆ array_view() [2/7]

template<typename T >
template<typename U , typename = Requires<DecayedConvertible<U>>>

constexpr gdb::array_view< T >::array_view | ( | U & | elem | ) |
| inline noexcept

Definition at line 102 of file array-view.h.

## ◆ array_view() [3/7]

template<typename T >
template<typename U , typename = Requires<DecayedConvertible<U>>>

constexpr gdb::array_view< T >::array_view | ( | U && | elem | ) |
| inline noexcept

Definition at line 109 of file array-view.h.

## ◆ array_view() [4/7]

template<typename T >
template<typename U , typename = Requires<DecayedConvertible<U>>>

constexpr gdb::array_view< T >::array_view | ( | U * | array,
|  | size_t | size
| ) |  |
| inline noexcept

Definition at line 117 of file array-view.h.

## ◆ array_view() [5/7]

template<typename T >
template<typename U , typename V , typename = Requires<DecayedConvertible<U>>, typename = Requires<DecayedConvertible<V>>>

constexpr gdb::array_view< T >::array_view | ( | U * | begin,
|  | V * | end
| ) |  |
| inline noexcept

Definition at line 126 of file array-view.h.

## ◆ array_view() [6/7]

template<typename T >
template<typename U , size_t Size, typename = Requires<DecayedConvertible<U>>>

constexpr gdb::array_view< T >::array_view | ( | U(&) | array[Size] | ) |
| inline noexcept

Definition at line 133 of file array-view.h.

## ◆ array_view() [7/7]

template<typename T >
template<typename Container , typename = Requires<gdb::Not<IsDecayedT<Container>>>, typename = Requires<std::is_convertible <decltype (std::declval<Container> ().data ()), T *>>, typename = Requires<std::is_convertible <decltype (std::declval<Container> ().size ()), size_type>>>

constexpr gdb::array_view< T >::array_view | ( | Container && | c | ) |
| inline noexcept

Definition at line 149 of file array-view.h.

## Member Function Documentation

## ◆ begin() [1/2]

template<typename T >

T* gdb::array_view< T >::begin | ( |  | ) |
| inline noexcept

Definition at line 158 of file array-view.h.

References gdb::array_view< T >::m_array.

## ◆ begin() [2/2]

template<typename T >

constexpr const T* gdb::array_view< T >::begin | ( |  | ) | const
| inline noexcept

Definition at line 159 of file array-view.h.

References gdb::array_view< T >::m_array.

## ◆ data() [1/2]

template<typename T >

T* gdb::array_view< T >::data | ( |  | ) |
| inline noexcept

Definition at line 155 of file array-view.h.

References gdb::array_view< T >::m_array.

## ◆ data() [2/2]

template<typename T >

constexpr const T* gdb::array_view< T >::data | ( |  | ) | const
| inline noexcept

Definition at line 156 of file array-view.h.

References gdb::array_view< T >::m_array.

## ◆ empty()

template<typename T >

constexpr bool gdb::array_view< T >::empty | ( |  | ) | const
| inline noexcept

Definition at line 170 of file array-view.h.

References gdb::array_view< T >::m_size.

## ◆ end() [1/2]

template<typename T >

T* gdb::array_view< T >::end | ( |  | ) |
| inline noexcept

Definition at line 161 of file array-view.h.

References gdb::array_view< T >::m_array, and gdb::array_view< T >::m_size.

## ◆ end() [2/2]

template<typename T >

constexpr const T* gdb::array_view< T >::end | ( |  | ) | const
| inline noexcept

Definition at line 162 of file array-view.h.

References gdb::array_view< T >::m_array, and gdb::array_view< T >::m_size.

## ◆ operator[]() [1/2]

template<typename T >

reference gdb::array_view< T >::operator[] | ( | size_t | index | ) |
| inline noexcept

Definition at line 164 of file array-view.h.

References gdb::array_view< T >::m_array.

## ◆ operator[]() [2/2]

template<typename T >

constexpr const_reference gdb::array_view< T >::operator[] | ( | size_t | index | ) | const
| inline noexcept

Definition at line 166 of file array-view.h.

References gdb::array_view< T >::m_array.

## ◆ size()

template<typename T >

constexpr size_type gdb::array_view< T >::size | ( |  | ) | const
| inline noexcept

Definition at line 169 of file array-view.h.

References gdb::array_view< T >::m_size.

## Member Data Documentation

## ◆ m_array

template<typename T >

T* gdb::array_view< T >::m_array
| private

Definition at line 173 of file array-view.h.

Referenced by gdb::array_view< T >::begin(), gdb::array_view< T >::data(), gdb::array_view< T >::end(), and gdb::array_view< T >::operator[]().

## ◆ m_size

template<typename T >

size_type gdb::array_view< T >::m_size
| private

Definition at line 174 of file array-view.h.

Referenced by gdb::array_view< T >::empty(), gdb::array_view< T >::end(), and gdb::array_view< T >::size().

The documentation for this class was generated from the following file:

- /tmp/gdb-8.1/gdb/common/array-view.h