A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../named_req/AccessorPolicy.html below:

C++ named requirements: AccessorPolicy (since C++23)

AccessorPolicy defines how elements are accessed from a given data handle to such elements and an index. It is used as a policy in std::mdspan to specify the access to a reference of an element using an underlying 1D index.

[edit] Requirements

A type A satisfies AccessorPolicy if it models copyable, and the following are true:

And, given the following types and values, the expressions shown in the table below are valid and have the indicated semantics:

[edit] Legend Type Definition A an accessor policy type OP an offset policy type Value Definition a a value of type (possibly const-qualified) A p a value of type (possibly const-qualified) A::data_handle_type i, j, n values of type std::size_t [edit] Member types
  1. ↑ Not required to be element_type*.
  2. ↑ Not required to be element_type&.
[edit] Member functions Expression Return type Semantics a.access(p, i) typename A::reference a.offset(p, i) typename A::offset_policy
          ::data_handle_type
[edit] Accessible range

A range of indices [​0​N) is an accessible range of a given data handle and an accessor if, for each index in the range, the access member function produces a valid reference to an element.

[edit] Standard library

The following standard library types satisfy AccessorPolicy requirements:

a type for indexed access to elements of mdspan
(class template) [edit] a type for aligned access to elements of mdspan
(class template) [edit] std::mdspan accessor policy whose reference represents the product of a scaling factor that is fixed and its nested std::mdspan accessor's reference
(class template) [edit] std::mdspan accessor policy whose reference represents the complex conjugate of its nested std::mdspan accessor's reference
(class template) [edit]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4