OpenKalman
writable.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_WRITABLE_HPP
17 #define OPENKALMAN_WRITABLE_HPP
18 
19 
20 namespace OpenKalman
21 {
27  template<typename T>
28 #ifdef __cpp_concepts
29  concept writable =
30  indexible<T> and interface::indexible_object_traits<std::decay_t<T>>::is_writable and
31  (not std::is_const_v<std::remove_reference_t<T>>) and std::copy_constructible<std::decay_t<T>>;
32 #else
33  constexpr bool writable =
34  indexible<T> and interface::is_explicitly_writable<T>::value and (not std::is_const_v<std::remove_reference_t<T>>) and
35  std::is_copy_constructible_v<std::decay_t<T>> and std::is_move_constructible_v<std::decay_t<T>>;
36 #endif
37 
38 
39 } // namespace OpenKalman
40 
41 #endif //OPENKALMAN_WRITABLE_HPP
Definition: tuple_reverse.hpp:103
constexpr bool value
T is numerical value or is reducible to a numerical value.
Definition: value.hpp:31
The root namespace for OpenKalman.
Definition: basics.hpp:34