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