OpenKalman
vector_space_descriptor_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) 2019-2023 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_VECTOR_SPACE_DESCRIPTOR_OF_HPP
17 #define OPENKALMAN_VECTOR_SPACE_DESCRIPTOR_OF_HPP
18 
19 
20 namespace OpenKalman
21 {
29 #ifdef __cpp_concepts
30  template<typename T, std::size_t N = 0>
31 #else
32  template<typename T, std::size_t N = 0, typename = void>
33 #endif
35 
36 
40 #ifdef __cpp_concepts
41  template<indexible T, std::size_t N> requires requires(T t) { {get_vector_space_descriptor<N>(t)} -> coordinates::pattern; }
42  struct vector_space_descriptor_of<T, N>
43 #else
44  template<typename T, std::size_t N>
45  struct vector_space_descriptor_of<T, N, std::enable_if_t<coordinates::pattern<decltype(get_vector_space_descriptor<N>(std::declval<T>()))>>>
46 #endif
47  {
48  using type = std::decay_t<decltype(get_vector_space_descriptor<N>(std::declval<T>()))>;
49  };
50 
51 
55  template<typename T, std::size_t N>
57 
58 
59 } // namespace OpenKalman
60 
61 #endif //OPENKALMAN_VECTOR_SPACE_DESCRIPTOR_OF_HPP
The coordinates::pattern for index N of object T.
Definition: vector_space_descriptor_of.hpp:34
The root namespace for OpenKalman.
Definition: basics.hpp:34
typename vector_space_descriptor_of< T, N >::type vector_space_descriptor_of_t
helper template for vector_space_descriptor_of.
Definition: vector_space_descriptor_of.hpp:56