cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
unit.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_COMPLEX_UNIT_H
4#define pRC_CORE_COMPLEX_UNIT_H
5
8
9namespace pRC
10{
11 template<class T>
12 struct Unit<T, If<IsComplex<T>>>
13 {
14 constexpr auto operator()()
15 {
16 return identity<T>();
17 }
18
19 template<class X, If<IsConstructible<T, X>> = 0>
20 constexpr auto operator()(X &&value)
21 {
22 return identity<T>(forward<X>(value));
23 }
24 };
25}
26#endif // pRC_CORE_COMPLEX_UNIT_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 type_traits.hpp:15
constexpr auto operator()()
Definition unit.hpp:14
constexpr auto operator()(X &&value)
Definition unit.hpp:20
Definition type_traits.hpp:265