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_BASIC_UNIT_H
4#define pRC_CORE_BASIC_UNIT_H
5
8
9namespace pRC
10{
11 template<class T>
12 struct Unit<T, If<Any<IsBool<T>, IsIntegral<T>>>> : public Identity<T>
13 {
14 };
15
16 template<>
17 struct Unit<Void<>>
18 {
19 template<class T, If<Any<IsBool<T>, IsIntegral<T>>> = 0>
20 constexpr operator T() const
21 {
22 return Unit<T>()();
23 }
24 };
25}
26#endif // pRC_CORE_BASIC_UNIT_H
pRC::Float<> T
Definition externs_nonTT.hpp:1
Definition cholesky.hpp:18
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
std::disjunction< Bs... > Any
Definition type_traits.hpp:80
std::enable_if_t< B{}, int > If
Definition type_traits.hpp:68
void Void
Definition type_traits.hpp:16
All< std::is_integral< T >, Not< IsBool< T > > > IsIntegral
Definition type_traits.hpp:180
Definition type_traits.hpp:262
Definition type_traits.hpp:99
Definition type_traits.hpp:265