[AMDGPU] Mark AGPR tuple implicit in the first instr of AGPR spills. (#115285)
[llvm-project.git] / libcxx / test / std / ranges / range.factories / range.istream.view / end.pass.cpp
blob80b1dfe2755d1f052f3db4d59063d27d5e8a223e
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: no-localization
10 // UNSUPPORTED: c++03, c++11, c++14, c++17
12 // constexpr default_sentinel_t end() const noexcept;
14 #include <cassert>
15 #include <ranges>
16 #include <sstream>
18 #include "test_macros.h"
19 #include "utils.h"
21 template <class T>
22 concept NoexceptEnd =
23 requires(T t) {
24 { t.end() } noexcept;
27 static_assert(NoexceptEnd<std::ranges::istream_view<int>>);
28 static_assert(NoexceptEnd<const std::ranges::istream_view<int>>);
30 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
31 static_assert(NoexceptEnd<std::ranges::wistream_view<int>>);
32 static_assert(NoexceptEnd<const std::ranges::wistream_view<int>>);
33 #endif
35 template <class CharT>
36 void test() {
37 auto iss = make_string_stream<CharT>("12");
38 std::ranges::basic_istream_view<int, CharT> isv{iss};
39 [[maybe_unused]] std::same_as<std::default_sentinel_t> auto sent = isv.end();
42 int main(int, char**) {
43 test<char>();
44 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
45 test<wchar_t>();
46 #endif
48 return 0;