// -*-C++ - *- //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------------------------------------------------===// /* extents synopsis namespace std { template class extents { public: using index_type = _IndexType; using size_type = make_unsigned_t; using rank_type = size_t; // [mdspan.extents.obs], observers of the multidimensional index space static constexpr rank_type rank() noexcept { return sizeof...(_Extents); } static constexpr rank_type rank_dynamic() noexcept { return dynamic-index(rank()); } static constexpr size_t static_extent(rank_type) noexcept; constexpr index_type extent(rank_type) const noexcept; // [mdspan.extents.cons], constructors constexpr extents() noexcept = default; template constexpr explicit(see below) extents(const extents<_OtherIndexType, _OtherExtents...>&) noexcept; template constexpr explicit extents(_OtherIndexTypes...) noexcept; template constexpr explicit(N != rank_dynamic()) extents(span<_OtherIndexType, N>) noexcept; template constexpr explicit(N != rank_dynamic()) extents(const array<_OtherIndexType, N>&) noexcept; // [mdspan.extents.cmp], comparison operators template friend constexpr bool operator==(const extents&, const extents<_OtherIndexType, _OtherExtents...>&) noexcept; private: // libcxx note: we do not use an array here, but we need to preserve the as-if behavior // for example the default constructor must zero initialize dynamic extents array dynamic-extents{}; // exposition only }; template explicit extents(Integrals...) -> see below; } */ #ifndef _LIBCPP_MDSPAN #define _LIBCPP_MDSPAN #include <__config> #include <__mdspan/extents.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif #endif // _LIBCPP_MDSPAN