7#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_IS_PREDICATE_HPP_
8#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_IS_PREDICATE_HPP_
13#include "arene/base/stdlib_choice/declval.hpp"
14#include "arene/base/stdlib_choice/enable_if.hpp"
15#include "arene/base/stdlib_choice/integral_constant.hpp"
16#include "arene/base/stdlib_choice/is_convertible.hpp"
22namespace is_predicate_detail {
30template <
class F,
class Args,
class =
void>
40template <
class F,
class... Args>
41class is_predicate_impl<
45 is_invocable_v<F, Args...> &&
46 std::is_convertible<invoke_result_t<F, Args...>, bool>::value &&
47 std::is_convertible<decltype(!std::declval<invoke_result_t<F, Args...>>()), bool>::value>>
62template <
class F,
class... Args>
Definition accumulate.hpp:37
constexpr bool is_predicate_v
backport for the C++20 predicate concept
Definition accumulate.hpp:36
bool_constant< false > false_type
An alias for bool_constant<false>
Definition integral_constant.hpp:79
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41
bool_constant< true > true_type
An alias for bool_constant<true>
Definition integral_constant.hpp:76
an empty struct that is a list of types - cheaper to instantiate than tuple
Definition type_list.hpp:19