std::default_accessor
From cppreference.com
 
 
 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Containers library 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
(C++17)
(C++11)
(C++26)
(C++26)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++23)
(C++23)
(C++20)
(C++23)
 Tables
std::mdspan 
 
 
 
 
 
 
 
 
 
 
 
 
 
(C++26)
(C++26)
(C++26)
default_accessor
(C++26)
(C++26)
(C++26)
(C++26)
(C++26)
(C++26)
Defined in header 
 
 
<mdspan> 
 template< class ElementType >
class default_accessor;
 
 (since C++23) 
class default_accessor;
A specialization of std::default_accessor class template is the default AccessorPolicy used by std::mdspan if no user-specified accessor policy is provided. 
Each specialization of default_accessor models semiregular and is TriviallyCopyable.
Contents
[edit] Template parameters
 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
[edit] Member types
 Member type
 Definition
offset_policy
 default_accessor
element_type
 ElementType
reference
 ElementType&
data_handle_type
 ElementType*
[edit] Member functions
(constructor)
default_accessor (public member function)
access
(public member function)
offset
(public member function)
std::default_accessor::default_accessor
constexpr default_accessor() noexcept = default;
 (1) 
 
template< class OtherElementType >
constexpr default_accessor( default_accessor<OtherElementType> ) noexcept {}
 (2) 
 
constexpr default_accessor( default_accessor<OtherElementType> ) noexcept {}
1) Default constructs a 
default_accessor.2) Constructs a 
default_accessor from default_accessor<OtherElementType>. The constructor has no visible effect. This overload participates in overload resolution only if std::is_convertible_v <OtherElementType(*)[], element_type(*)[]> is true.
std::default_accessor::access
constexpr reference access( data_handle_type p, std::size_t i ) const noexcept;
 
 
Equivalent to return p[i];.
std::default_accessor::offset
constexpr data_handle_type offset( data_handle_type p, std::size_t i ) const noexcept;
 
 
Equivalent to return p + i;.
[edit] Example
 This section is incomplete
Reason: no example
Reason: no example