1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
13 // template<class Extents>
14 // class layout_stride::mapping;
16 // If Extents is not a specialization of extents, then the program is
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.
26 // expected-error-re@*:* {{static assertion failed {{.*}}layout_stride::mapping template argument must be a specialization of extents}}
27 [[maybe_unused
]] std::layout_stride::mapping
<void> mapping
;
30 void representable() {
31 // expected-error-re@*:* {{static assertion failed {{.*}}layout_stride::mapping product of static extents must be representable as index_type.}}
32 [[maybe_unused
]] std::layout_stride::mapping
<std::extents
<signed char, 20, 20>> mapping
;