![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
Accessor policy for mdspan which always returns the same value.
More...
Public Types | |
| using | data_handle_type = ElementType |
| The type of the data handle — this is the same as the element type, so no backing data is required, the fixed value is passed in as the handle. | |
| using | element_type = ElementType |
| The type of the element. | |
| using | offset_policy = constant_accessor |
The type of the accessor policy for accessing data with an offset — this is constant_accessor , since the value is constant, so the offset doesn't matter. | |
| using | reference = ElementType |
| The type of a "reference" to the element — this is the same as the element type, so no backing data is required, the value is returned by value. | |
Static Public Member Functions | |
| static constexpr auto | access (data_handle_type data_handle, std::size_t) noexcept -> reference |
| Return the value for the given data handle and index. The index is ignored as the value is always constant. | |
| static constexpr auto | offset (data_handle_type data_handle, std::size_t) noexcept -> reference |
| Return the data handle value to use with the offset policy for the given data handle and index. The index is ignored as the value is always constant. | |
Accessor policy for mdspan which always returns the same value.
| ElementType | the type of the element |
| using arene::base::constant_accessor< ElementType >::data_handle_type = ElementType |
The type of the data handle — this is the same as the element type, so no backing data is required, the fixed value is passed in as the handle.
| using arene::base::constant_accessor< ElementType >::element_type = ElementType |
The type of the element.
| using arene::base::constant_accessor< ElementType >::offset_policy = constant_accessor |
The type of the accessor policy for accessing data with an offset — this is constant_accessor , since the value is constant, so the offset doesn't matter.
| using arene::base::constant_accessor< ElementType >::reference = ElementType |
The type of a "reference" to the element — this is the same as the element type, so no backing data is required, the value is returned by value.
|
inlinestaticconstexprnoexcept |
Return the value for the given data handle and index. The index is ignored as the value is always constant.
| data_handle | The fixed value to return |
data_handle
|
inlinestaticconstexprnoexcept |
Return the data handle value to use with the offset policy for the given data handle and index. The index is ignored as the value is always constant.
| data_handle | The fixed value to return |
data_handle