//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 // template // concept relation; #include static_assert(std::relation); static_assert(std::relation); static_assert(std::relation); static_assert(!std::relation); static_assert(!std::relation); static_assert(!std::relation); static_assert(!std::relation); static_assert(!std::relation); struct S1 {}; static_assert(std::relation); static_assert(std::relation); struct S2 {}; struct P1 { bool operator()(S1, S1) const; }; static_assert(std::relation); struct P2 { bool operator()(S1, S1) const; bool operator()(S1, S2) const; }; static_assert(!std::relation); struct P3 { bool operator()(S1, S1) const; bool operator()(S1, S2) const; bool operator()(S2, S1) const; }; static_assert(!std::relation); struct P4 { bool operator()(S1, S1) const; bool operator()(S1, S2) const; bool operator()(S2, S1) const; bool operator()(S2, S2) const; }; static_assert(std::relation);