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 I1, class I2, class Out,
13 //     class R = ranges::less, class P1 = identity, class P2 = identity>
14 //   concept mergeable = see below;                           // since C++20
15 
16 #include <iterator>
17 
18 #include "test_macros.h"
19 
20 template <class I1, class I2, class O>
21 void test_subsumption() requires std::input_iterator<I1> && std::input_iterator<I2>;
22 
23 template <class I1, class I2, class O>
24 void test_subsumption() requires std::weakly_incrementable<O>;
25 
26 template <class I1, class I2, class O>
27 void test_subsumption() requires std::indirectly_copyable<I1, O> && std::indirectly_copyable<I2, O>;
28 
29 template <class I1, class I2, class O>
30 void test_subsumption() requires std::indirect_strict_weak_order<I1, I2>;
31 
32 template <class I1, class I2, class O>
33 constexpr bool test_subsumption() requires std::mergeable<I1, I2, O> {
34   return true;
35 }
36 
37 static_assert(test_subsumption<int*, int*, int*>());
38