OpenKalman
fixed_pattern.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) 2019-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_COORDINATE_FIXED_PATTERN_HPP
17 #define OPENKALMAN_COORDINATE_FIXED_PATTERN_HPP
18 
20 #include "pattern.hpp"
22 
24 {
25 #ifndef __cpp_concepts
26  namespace detail
27  {
28  template<typename T, typename = void>
29  struct fixed_pattern_impl : std::false_type {};
30 
31  template<typename T>
32  struct fixed_pattern_impl<T, std::enable_if_t<dimension_of<T>::value != stdex::dynamic_extent>> : std::true_type {};
33  }
34 #endif
35 
36 
40  template<typename T>
41 #ifdef __cpp_concepts
42  concept fixed_pattern =
43  pattern<T> and
44  (dimension_of<T>::value != stdex::dynamic_extent);
45 #else
46  constexpr bool fixed_pattern =
47  pattern<T> and
49 #endif
50 
51 }
52 
53 #endif
Definition for coordinates::pattern.
The size of a coordinates::pattern.
Definition: dimension_of.hpp:36
The namespace for features relating to coordinates::pattern object.
Definition: compares_with.hpp:25
constexpr bool fixed_pattern
A coordinates::pattern for which the dimension is fixed at compile time.
Definition: fixed_pattern.hpp:46
Inclusion file for collections.
Definition for coordinates::dimension_of.