23
Containers library
[containers]
23.7
Views
[views]
23.7.3
Multidimensional access
[views.multidim]
23.7.3.5
Accessor policy
[mdspan.accessor]
23.7.3.5.3
Class template
default_
accessor
[mdspan.accessor.default]
23.7.3.5.3.1
Overview
[mdspan.accessor.default.overview]
namespace
std
{
template
<
class
ElementType
>
struct
default_accessor
{
using
offset_policy
=
default_accessor;
using
element_type
=
ElementType;
using
reference
=
ElementType
&
;
using
data_handle_type
=
ElementType
*
;
constexpr
default_accessor
(
)
noexcept
=
default
;
template
<
class
OtherElementType
>
constexpr
default_accessor
(
default_accessor
<
OtherElementType
>
)
noexcept
;
constexpr
reference access
(
data_handle_type p, size_t i
)
const
noexcept
;
constexpr
data_handle_type offset
(
data_handle_type p, size_t i
)
const
noexcept
;
}
;
}
1
#
default_
accessor
meets the accessor policy requirements
.
2
#
ElementType
is required to be a complete object type that is neither an abstract class type nor an array type
.
3
#
Each specialization of
default_
accessor
is a trivially copyable type that models
semiregular
.
4
#
[
0
,
n
)
is an accessible range for an object
p
of type
data_
handle_
type
and an object of type
default_
accessor
if and only if [
p, p
+
n
) is a valid range
.