[mdspan.extents.cons] (original) (raw)

23 Containers library [containers]

23.7 Views [views]

23.7.3 Multidimensional access [views.multidim]

23.7.3.3 Class template extents [mdspan.extents]

23.7.3.3.3 Constructors [mdspan.extents.cons]

template<class OtherIndexType, size_t... OtherExtents> constexpr explicit(_see below_) extents(const extents<OtherIndexType, OtherExtents...>& other) noexcept;

Constraints:

Preconditions:

Postconditions: *this == other is true.

Remarks: The expression inside explicit is equivalent to:(((Extents != dynamic_extent) && (OtherExtents == dynamic_extent)) || ... ) || (numeric_limits<index_type>::max() < numeric_limits<OtherIndexType>::max())

template<class... OtherIndexTypes> constexpr explicit extents(OtherIndexTypes... exts) noexcept;

Let N be sizeof...(OtherIndexTypes), and let exts_arr bearray<index_type, N>{static_cast<
index_type>(std​::​move(exts))...}.

Constraints:

Preconditions:

Postconditions: *this == extents(exts_arr) is true.

template<class OtherIndexType, size_t N> constexpr explicit(N != rank_dynamic()) extents(span<OtherIndexType, N> exts) noexcept;template<class OtherIndexType, size_t N> constexpr explicit(N != rank_dynamic()) extents(const array<OtherIndexType, N>& exts) noexcept;

Constraints:

Preconditions:

Effects:

template<class... Integrals> explicit extents(Integrals...) -> _see below_;

Constraints: (is_convertible_v<Integrals, size_t> && ...) is true.