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