OpenKalman
size.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_VALUE_SIZE_HPP
17 #define OPENKALMAN_VALUE_SIZE_HPP
18 
19 #include <type_traits>
20 #include "index.hpp"
21 
22 namespace OpenKalman::values
23 {
27 #ifdef __cpp_concepts
28  template<typename T>
29  concept size = index<T> or std::is_same_v<std::decay_t<T>, std::unreachable_sentinel_t>;
30 #else
31  template<typename T>
32  constexpr bool size = index<T> or std::is_same_v<std::decay_t<T>, unreachable_sentinel_t>;
33 #endif
34 
35 } // namespace OpenKalman::values
36 
37 #endif //OPENKALMAN_VALUE_SIZE_HPP
Definition for values::index.
Definition: iterator.hpp:423
constexpr bool size
T is either an index representing a size, or void which represents that there is no size...
Definition: size.hpp:32
Definition for values::abs.
Definition: constant_coefficient.hpp:25