OpenKalman
descriptor_range.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_COORDINATES_GROUP_RANGE_HPP
17 #define OPENKALMAN_COORDINATES_GROUP_RANGE_HPP
18 
19 #ifdef __cpp_lib_ranges
20 #include <ranges>
21 #else
23 #endif
25 #include "descriptor.hpp"
26 
28 {
29 #ifndef __cpp_lib_ranges
30  namespace detail
31  {
32  template<typename T, typename = void>
33  struct is_descriptor_range : std::false_type {};
34 
35  template<typename T>
36  struct is_descriptor_range<T, std::enable_if_t<descriptor<ranges::range_value_t<T>>>> : std::true_type {};
37  } // namespace detail
38 #endif
39 
40 
45  template<typename T>
46 #ifdef __cpp_lib_ranges
47  concept descriptor_range = collections::sized_random_access_range<T> and descriptor<std::ranges::range_value_t<T>>;
48 #else
49  constexpr bool descriptor_range = collections::sized_random_access_range<T> and
51 #endif
52 
53 
54 } // namespace OpenKalman::coordinates
55 
56 #endif //OPENKALMAN_COORDINATES_GROUP_RANGE_HPP
Definition: descriptor_range.hpp:33
Definition for collections::sized_random_access_range.
Definition: tuple_reverse.hpp:103
constexpr bool value
T is numerical value or is reducible to a numerical value.
Definition: value.hpp:31
Definition for coordinates::descriptor.
Definition: compares_with.hpp:28
constexpr bool descriptor_range
An object describing a range of collections::descriptor objects.
Definition: descriptor_range.hpp:49
Definitions implementing features of the c++ ranges library for compatibility.