pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
prc
core
functors
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
6
#include <
prc/core/basic/direction.hpp
>
7
#include <
prc/core/basic/type_traits.hpp
>
8
#include <
prc/core/value/functions/fold.hpp
>
9
10
namespace
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
type_traits.hpp
direction.hpp
pRC
Definition
cholesky.hpp:18
pRC::copy
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition
copy.hpp:13
pRC::Fold
Definition
fold.hpp:14
pRC::Fold::operator()
constexpr decltype(auto) operator()(Xs &&...args) const
Definition
fold.hpp:17
fold.hpp
Generated by
1.9.8