OpenKalman
real_type_of_t.hpp
Go to the documentation of this file.
1 /* This file is part of OpenKalman, a header-only C++ library for
2  * Kalman filters and other recursive filters.
3  *
4  * Copyright (c) 2024 Christopher Lee Ogden <ogden@gatech.edu>
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0. If a copy of the MPL was not distributed with this
8  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
9  */
10 
16 #ifndef OPENKALMAN_VALUES_REAL_TYPE_OF_T_HPP
17 #define OPENKALMAN_VALUES_REAL_TYPE_OF_T_HPP
18 
19 #include <type_traits>
22 #include "values/math/real.hpp"
23 
24 namespace OpenKalman::values
25 {
30 #ifdef __cpp_concepts
31  template<value T>
32 #else
33  template<typename T, std::enable_if_t<value<T>, int> = 0>
34 #endif
35  using real_type_of_t = std::decay_t<decltype(values::real(std::declval<T>()))>;
36 
37 
38 } // namespace OpenKalman::values
39 
40 #endif //OPENKALMAN_VALUES_REAL_TYPE_OF_T_HPP
Definition for values::to_number.
Definition for values::abs.
Definition: constant_coefficient.hpp:25
Definition for values::real.
std::decay_t< decltype(values::real(std::declval< T >()))> real_type_of_t
Obtain the real type associated with a number (typically a values::complex number.
Definition: real_type_of_t.hpp:35
Definition for ::value.