OpenKalman
value.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) 2022-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_VALUE_HPP
17 #define OPENKALMAN_VALUES_VALUE_HPP
18 
19 #include "number.hpp"
21 
22 namespace OpenKalman::values
23 {
24 #ifndef __cpp_concepts
25  namespace detail
26  {
27  template<typename T, typename = void>
28  struct value_impl : std::false_type {};
29 
30 
31  template<typename T>
32  struct value_impl<T, std::enable_if_t<number<typename values::value_type_of<T>::type>>>
33  : std::true_type {};
34  }
35 #endif
36 
37 
41  template<typename T>
42 #ifdef __cpp_concepts
43  concept value = number<value_type_of_t<T>>;
44 #else
45  constexpr bool value = detail::value_impl<T>::value;
46 #endif
47 
48 }
49 
50 #endif
constexpr bool value
T is a fixed or dynamic value that is reducible to a number.
Definition: value.hpp:45
Definition for value:value_type_of and value:value_type_of_t.
Definition for values::abs.
Definition: fixed-constants.hpp:23
Definition for values::number.