(C++17) | ||||
| Sequence | ||||
(C++11) | ||||
(C++26) | ||||
(C++26) | ||||
(C++11) | ||||
| Associative | ||||
| Unordered associative | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Adaptors | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
| Views | ||||
(C++20) | ||||
(C++23) | ||||
| Tables | ||||
| Iterator invalidation | ||||
| Member function table | ||||
| Non-member function table |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <mdspan> | ||
template<class ElementType> class default_accessor; | (since C++23) | |
A specialization ofstd::default_accessor class template is the defaultAccessorPolicy used bystd::mdspan if no user-specified accessor policy is provided.
Each specialization ofdefault_accessor modelssemiregular and isTriviallyCopyable.
Contents |
| ElementType | - | the element type. Shall be a complete object type that is neither an abstract class type nor an array type. Otherwise, the program is ill-formed |
| Member type | Definition |
offset_policy | default_accessor |
element_type | ElementType |
reference | ElementType& |
data_handle_type | ElementType* |
(constructor) | constructs adefault_accessor(public member function) |
access | returns a nth element provided by arguments (public member function) |
offset | returns a data handle advanced by an offset value (public member function) |
constexpr default_accessor()noexcept=default; | (1) | |
template<class OtherElementType> constexpr default_accessor( default_accessor<OtherElementType>)noexcept{} | (2) | |
default_accessor.default_accessor fromdefault_accessor<OtherElementType>. The constructor has no visible effect. This overload participates in overload resolution only ifstd::is_convertible_v<OtherElementType(*)[], element_type(*)[]> is true.constexpr reference access( data_handle_type p,std::size_t i)constnoexcept; | ||
Equivalent toreturn p[i];.
constexpr data_handle_type offset( data_handle_type p,std::size_t i)constnoexcept; | ||
Equivalent toreturn p+ i;.
| This section is incomplete Reason: no example |