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 
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
10 // UNSUPPORTED: libcpp-no-concepts
11 
12 // template<class T>
13 // concept input_iterator;
14 
15 #include <iterator>
16 
17 #include <concepts>
18 
19 // clang-format off
20 template<std::input_or_output_iterator I>
21 requires std::indirectly_readable<I>
check_subsumption()22 constexpr bool check_subsumption() {
23   return false;
24 }
25 
26 template<std::input_iterator>
check_subsumption()27 constexpr bool check_subsumption() {
28   return true;
29 }
30 // clang-format on
31 
32 static_assert(check_subsumption<int*>());
33