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>
12// concept indirectly_swappable;
13
14#include <iterator>
15
16#include <concepts>
17
18template<class I1, class I2>
19 requires std::indirectly_readable<I1> && std::indirectly_readable<I2>
20constexpr bool indirectly_swappable_subsumption() {
21 return false;
22}
23
24template<class I1, class I2>
25 requires std::indirectly_swappable<I1, I2>
26constexpr bool indirectly_swappable_subsumption() {
27 return true;
28}
29
30static_assert(indirectly_swappable_subsumption<int*, int*>());
31

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