[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / containers / views / mdspan / layout_right / extents.verify.cpp
blobc0d1876dca441dac7310f2e64b77ca60bea4aaa7
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
11 // <mdspan>
13 // template<class Extents>
14 // class layout_left::mapping;
16 // If Extents is not a specialization of extents, then the program is
17 // ill-formed.
19 // Mandates: If Extents::rank_dynamic() == 0 is true, then the size of the
20 // multidimensional index space Extents() is representable as a value of type
21 // typename Extents::index_type.
23 #include <mdspan>
25 void not_extents() {
26 // expected-error-re@*:* {{static assertion failed {{.*}}layout_right::mapping template argument must be a specialization of extents}}
27 [[maybe_unused]] std::layout_right::mapping<void> mapping;
30 void representable() {
31 // expected-error-re@*:* {{static assertion failed {{.*}}layout_right::mapping product of static extents must be representable as index_type.}}
32 [[maybe_unused]] std::layout_right::mapping<std::extents<signed char, 20, 20>> mapping;