13 #ifndef ROOT_RDF_HELPERS 14 #define ROOT_RDF_HELPERS 23 #include <type_traits> 28 template <
typename... ArgTypes,
typename F>
31 return std::function<bool(ArgTypes...)>([=](ArgTypes... args)
mutable {
return !
f(args...); });
34 template <
typename... ArgTypes,
typename Ret,
typename... Args>
37 return std::function<bool(ArgTypes...)>([=](ArgTypes... args)
mutable {
return !
f(args...); });
55 static_assert(std::is_same<Ret, bool>::value,
"RDF::Not requires a callable that returns a bool.");
Namespace for new ROOT classes and functions.
auto Not(F &&f) -> decltype(ROOT::Internal::NotHelper(Args(), std::forward< F >(f)))
Given a callable with signature bool(T1, T2, ...) return a callable with same signature that returns ...
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Lightweight storage for a collection of types.
std::function< bool(ArgTypes...)> NotHelper(ROOT::TypeTraits::TypeList< ArgTypes... >, F &&f)
Extract types from the signature of a callable object. See CallableTraits.