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 12 // template<class F, class... Args> 13 // concept predicate; 14 15 #include <concepts> 16 17 constexpr bool check_subsumption(std::regular_invocable auto) { 18 return false; 19 } 20 21 // clang-format off 22 template<class F> 23 requires std::predicate<F> && true 24 constexpr bool check_subsumption(F) 25 { 26 return true; 27 } 28 // clang-format on 29 30 static_assert(!check_subsumption([] {})); 31 static_assert(check_subsumption([] { return true; })); 32