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 I, class R = ranges::less, class P = identity>
12// concept sortable = see below; // since C++20
13
14#include <iterator>
15
16#include <functional>
17
18template <class I, class R, class P> void test_subsumption() requires std::permutable<I>;
19
20template <class I, class R, class P> void test_subsumption()
21 requires std::indirect_strict_weak_order<R, std::projected<I, P>>;
22
23template <class I, class R, class P> constexpr bool test_subsumption() requires std::sortable<I, R, P> { return true; }
24
25static_assert(test_subsumption<int*, std::ranges::less, std::identity>());
26

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