cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
minus.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_FUNCTORS_MINUS_H
4#define pRC_CORE_FUNCTORS_MINUS_H
5
7
8namespace pRC
9{
10 struct Minus
11 {
12 template<class X, If<True<decltype(-declval<X>())>> = 0>
13 constexpr decltype(auto) operator()(X &&a) const
14 {
15 return -forward<X>(a);
16 }
17 };
18}
19#endif // pRC_CORE_FUNCTORS_MINUS_H
Definition cholesky.hpp:18
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
std::enable_if_t< B{}, int > If
Definition type_traits.hpp:68
Definition minus.hpp:11
constexpr decltype(auto) operator()(X &&a) const
Definition minus.hpp:13
Definition type_traits.hpp:38