[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / libcxx / test / std / containers / views / span.tuple / get.fail.cpp
blob7544ea3cd586827c6a4829c72573ff73c0f60a28
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 //===----------------------------------------------------------------------===//
8 // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17
10 // <span>
12 // template <size_t _Ip, ElementType, size_t Extent>
13 // constexpr ElementType& get(span<ElementType, Extent> s) noexcept;
15 #include <span>
17 #include "test_macros.h"
20 int main(int, char**)
22 // No get for dynamic spans
23 constexpr int arr [] = {0,1,2,3,4,5,6,7,8,9};
24 (void) std::get< 0>(std::span<const int, 0>(arr, (size_t)0)); // expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Index out of bounds in std::get<> (std::span)"}}
25 (void) std::get< 5>(std::span<const int, 5>(arr, 5)); // expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Index out of bounds in std::get<> (std::span)"}}
26 (void) std::get<20>(std::span<const int, 10>(arr, 10)); // expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Index out of bounds in std::get<> (std::span)"}}
28 return 0;