OpenKalman
collection_view.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) 2024-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_COLLECTIONS_COLLECTION_VIEW_HPP
17 #define OPENKALMAN_COLLECTIONS_COLLECTION_VIEW_HPP
18 
19 #ifdef __cpp_lib_ranges
20 #include <ranges>
21 #else
23 #endif
24 #include "uniformly_gettable.hpp"
25 
27 {
32  template<typename T>
33 #ifdef __cpp_lib_ranges
34  concept collection_view = std::ranges::view<T> and uniformly_gettable<T> and std::ranges::random_access_range<T>;
35 #else
36  constexpr bool collection_view = ranges::view<T> and uniformly_gettable<T> and ranges::random_access_range<T>;
37 #endif
38 
39 
40 } // namespace OpenKalman
41 
42 #endif //OPENKALMAN_COLLECTIONS_COLLECTION_VIEW_HPP
Namespace for collections.
Definition: collections.hpp:27
constexpr bool collection_view
A view to a collection which is also a std::ranges:view.
Definition: collection_view.hpp:36
Definition for collections::uniformly_gettable.