//===----------------------------------------------------------------------===// // // 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 // //===----------------------------------------------------------------------===// #ifndef TEST_STD_FUNCTIONOBJECTS_REFWRAP_HELPER_CONCEPTS_H #define TEST_STD_FUNCTIONOBJECTS_REFWRAP_HELPER_CONCEPTS_H #include #include // Equality template concept HasEqualityOperatorWithInt = requires(T t, int i) { { t.get() == i } -> std::convertible_to; }; // Spaceship template concept BooleanTestableImpl = std::convertible_to; template concept BooleanTestable = BooleanTestableImpl && requires(T&& t) { { !std::forward(t) } -> BooleanTestableImpl; }; template concept HasSpaceshipOperatorWithInt = requires(T t, int i) { { t < i } -> BooleanTestable; { i < t } -> BooleanTestable; }; #endif // TEST_STD_FUNCTIONOBJECTS_REFWRAP_HELPER_CONCEPTS_H