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