OpenKalman
constant_value_of.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) 2025 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_CONSTANT_VALUE_OF_HPP
17 #define OPENKALMAN_CONSTANT_VALUE_OF_HPP
18 
20 
21 namespace OpenKalman
22 {
26 #ifdef __cpp_concepts
27  template<typename T>
28 #else
29  template<typename T, typename = void>
30 #endif
31  struct constant_value_of {};
32 
33 
37 #ifdef __cpp_concepts
38  template<typename T> requires values::fixed<decltype(constant_value(std::declval<T>()))>
40 #else
41  template<typename T>
42  struct constant_value_of<T, std::enable_if_t<values::fixed<decltype(constant_value(std::declval<T>()))>>>
43 #endif
45 
46 
50  template<typename T>
52 
53 }
54 
55 #endif
Definition for constant_value.
The fixed value associated with a fixed.
Definition: fixed_value_of.hpp:44
The root namespace for OpenKalman.
Definition: basics.hpp:34
constexpr auto constant_value(T &&t)
The constant value associated with a constant_object or constant_diagonal_object. ...
Definition: constant_value.hpp:37
The static constant value of an indexible object, if it exists.
Definition: constant_value_of.hpp:31
constexpr bool fixed
T is a value that is determinable at compile time.
Definition: fixed.hpp:66
constexpr auto constant_value_of_v
helper template for constant_value_of.
Definition: constant_value_of.hpp:51