operator template · 3 overloads
std::mdspan::operator[]
- Header
<mdspan>- Scope
std::mdspan- cppreference
- std::mdspan nearest page
Subscript operators
Overloads
- (1)
template<class OtherIndexType> requires (is_convertible_v<const OtherIndexType&, index_type> && is_nothrow_constructible_v<index_type, const OtherIndexType&>) constexpr reference operator[](span<OtherIndexType, rank()> indices) const; - (2)
template<class... OtherIndexTypes> requires ((is_convertible_v<OtherIndexTypes, index_type> && ...) && (is_nothrow_constructible_v<index_type, OtherIndexTypes> && ...) && sizeof...(OtherIndexTypes) == rank( )) constexpr reference operator[](OtherIndexTypes... indices) const; - (3)
template<class OtherIndexType> requires (is_convertible_v<const OtherIndexType&, index_type> && is_nothrow_constructible_v<index_type, const OtherIndexType&>) constexpr reference operator[](const array<OtherIndexType, rank()>& indices) const;