OpenKalman
number_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_NUMBER_TYPE_OF_T_HPP
17 #define OPENKALMAN_VALUES_NUMBER_TYPE_OF_T_HPP
18 
19 #include <type_traits>
22 
23 
24 namespace OpenKalman::values
25 {
29 #ifdef __cpp_concepts
30  template<values::value T>
31 #else
32  template<typename T, std::enable_if_t<values::value<T>, int> = 0>
33 #endif
34  using number_type_of_t = std::decay_t<decltype(values::to_number(std::declval<T>()))>;
35 
36 
37 } // namespace OpenKalman::values
38 
39 #endif //OPENKALMAN_VALUES_NUMBER_TYPE_OF_T_HPP
Definition for values::to_number.
Definition for values::abs.
Definition: constant_coefficient.hpp:25
std::decay_t< decltype(values::to_number(std::declval< T >()))> number_type_of_t
Obtain the values::number type associated with avalues::value.
Definition: number_type_of_t.hpp:34
Definition for ::value.