pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
prc
core
value
functions
cast.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-2-Clause
2
3
#ifndef pRC_CORE_VALUE_FUNCTIONS_CAST_H
4
#define pRC_CORE_VALUE_FUNCTIONS_CAST_H
5
6
#include <
prc/core/value/type_traits.hpp
>
7
8
namespace
pRC
9
{
18
template
<
class
C, If<IsValue<C>> = 0,
class
T, If<IsValue<T>> = 0,
19
If<IsConstructible<C,
typename
T::Fundamental>> = 0>
20
static
inline
constexpr
auto
cast
(
T
const
&a)
21
{
22
return
C
(a());
23
}
24
}
25
#endif
// pRC_CORE_VALUE_FUNCTIONS_CAST_H
type_traits.hpp
pRC
Definition
cholesky.hpp:18
pRC::copy
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition
copy.hpp:13
pRC::cast
static constexpr auto cast(Complex< T > const &a)
Definition
cast.hpp:13
Generated by
1.9.8