VCCC  2024.05
VisualCamp Common C++ library
predicate.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2023/12/27.
3 //
4 
5 #ifndef VCCC_CONCEPTS_PREDICATE_HPP
6 #define VCCC_CONCEPTS_PREDICATE_HPP
7 
11 
12 namespace vccc {
13 namespace detail {
14 
15 template<bool v /* false */, typename F, typename... Args>
16 struct predicate_impl : std::false_type {};
17 
18 template<typename F, typename... Args>
19 struct predicate_impl<true, F, Args...> : boolean_testable<invoke_result_t<F, Args...>> {};
20 
21 } // namespace detail
24 
36 template<typename F, typename... Args>
37 struct predicate : detail::predicate_impl<regular_invocable<F, Args...>::value, F, Args...> {};
38 
40 
41 } // namespace vccc
42 
43 #endif // VCCC_CONCEPTS_PREDICATE_HPP
Definition: directory.h:12
specifies that a callable type is a Boolean predicate
Definition: predicate.hpp:37