pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
logical_or.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_FUNCTORS_LOGICAL_OR_H
4#define pRC_CORE_FUNCTORS_LOGICAL_OR_H
5
8
9namespace pRC
10{
11 struct LogicalOr
12 {
13 template<class T, If<IsInvocable<Zero<T>>> = 0>
14 static constexpr auto Identity()
15 {
16 return zero<T>();
17 }
18
19 template<class XA, class XB,
21 constexpr decltype(auto) operator()(XA &&a, XB &&b) const
22 {
23 return forward<XA>(a) || forward<XB>(b);
24 }
25 };
26}
27#endif // pRC_CORE_FUNCTORS_LOGICAL_OR_H
Definition cholesky.hpp:18
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition copy.hpp:13
Definition logical_or.hpp:12
constexpr decltype(auto) operator()(XA &&a, XB &&b) const
Definition logical_or.hpp:21
static constexpr auto Identity()
Definition logical_or.hpp:14