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
19template <class I1, class I2, class O>
20void test_subsumption() requires std::input_iterator<I1> && std::input_iterator<I2>;
21
22template <class I1, class I2, class O>
23void test_subsumption() requires std::weakly_incrementable<O>;
24
25template <class I1, class I2, class O>
26void test_subsumption() requires std::indirectly_copyable<I1, O> && std::indirectly_copyable<I2, O>;
27
28template <class I1, class I2, class O>
29void test_subsumption() requires std::indirect_strict_weak_order<I1, I2>;
30
31template <class I1, class I2, class O>
32constexpr bool test_subsumption() requires std::mergeable<I1, I2, O> {
33 return true;
34}
35
36static_assert(test_subsumption<int*, int*, int*>());
37

source code of libcxx/test/std/iterators/iterator.requirements/alg.req.mergeable/mergeable.subsumption.compile.pass.cpp