cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
fold.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_FUNCTORS_FOLD_H
4#define pRC_CORE_FUNCTORS_FOLD_H
5
8
9namespace pRC
10{
11 template<class F, Bool E = false, Direction D = Direction::Forwards>
12 struct Fold
13 {
14 template<class... Xs>
15 requires requires { fold<F, E, D>(declval<Xs>()...); }
16 constexpr decltype(auto) operator()(Xs &&...args) const
17 {
18 return fold<F, E, D>(forward<Xs>(args)...);
19 }
20 };
21}
22#endif // pRC_CORE_FUNCTORS_FOLD_H
Definition cholesky.hpp:10
static constexpr decltype(auto) fold(X &&a)
Definition fold.hpp:14
Definition fold.hpp:13