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