cMHN 1.1
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
9
10namespace pRC
11{
12 template<class F, Bool E, Direction D>
13 struct Fold
14 {
15 template<class... Xs,
16 If<True<decltype(fold<F, E, D>(declval<Xs>()...))>> = 0>
17 constexpr decltype(auto) operator()(Xs &&...args) const
18 {
19 return fold<F, E, D>(forward<Xs>(args)...);
20 }
21 };
22}
23#endif // pRC_CORE_FUNCTORS_FOLD_H
Definition cholesky.hpp:18
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
Definition fold.hpp:14
constexpr decltype(auto) operator()(Xs &&...args) const
Definition fold.hpp:17