5#ifndef DUNE_COMMON_STD_DEFAULT_ACCESSOR_HH
6#define DUNE_COMMON_STD_DEFAULT_ACCESSOR_HH
22template <
class Element>
37 template <class OtherElement,
38 std::enable_if_t<
std::is_convertible_v<OtherElement(*)[], Element(*)[]>,
int> = 0>
Namespace for features backported from new C++ standards.
Definition default_accessor.hh:10
A type for indexed access to elements of mdspan.
Definition default_accessor.hh:24
element_type * data_handle_type
Definition default_accessor.hh:27
element_type & reference
Definition default_accessor.hh:28
Element element_type
Definition default_accessor.hh:26
constexpr default_accessor() noexcept=default
Default constructor.
constexpr reference access(data_handle_type p, std::size_t i) const noexcept
Return a reference to the i'th element in the data range starting at p
Definition default_accessor.hh:42
constexpr data_handle_type offset(data_handle_type p, std::size_t i) const noexcept
Return a data handle to the i'th element in the data range starting at p
Definition default_accessor.hh:48