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 18 template<class I1, class I2> 19 requires std::indirectly_readable<I1> && std::indirectly_readable<I2> indirectly_swappable_subsumption()20constexpr bool indirectly_swappable_subsumption() { 21 return false; 22 } 23 24 template<class I1, class I2> 25 requires std::indirectly_swappable<I1, I2> indirectly_swappable_subsumption()26constexpr bool indirectly_swappable_subsumption() { 27 return true; 28 } 29 30 static_assert(indirectly_swappable_subsumption<int*, int*>()); 31