16 #ifndef OPENKALMAN_INTERFACES_ARRAYS_OBJECT_TRAITS_HPP 17 #define OPENKALMAN_INTERFACES_ARRAYS_OBJECT_TRAITS_HPP 29 template<
typename T> requires std::is_bounded_array_v<T>
30 struct object_traits<T>
40 template<std::size_t rank = 0, std::size_t...es>
41 struct mdspan_extents : mdspan_extents<rank + 1, es..., std::extent_v<T, rank>> {};
43 template<std::size_t...es>
44 struct mdspan_extents<std::rank_v<T>, es...> {
using type =
stdex::extents<std::size_t, es...>; };
47 static constexpr
auto*
48 ptr_first_element(P* p)
50 if constexpr (std::rank_v<P> > 0)
51 return ptr_first_element(p[0]);
64 using scalar = std::remove_all_extents_t<std::remove_reference_t<decltype(t)>>;
65 using ext =
typename mdspan_extents<>::type;
constexpr auto get_mdspan(T &t)
Get the coordinates::pattern_collection associated with indexible object T.
Definition: get_mdspan.hpp:35
Definition: basics.hpp:41
static const bool is_specialized
Identifies types for which object_traits is specialized.
Definition: object_traits.hpp:44
Definition: mdspan.hpp:34
Forward declaration of object_traits, which must be defined for all objects used in OpenKalman...
Definition: object_traits.hpp:38
Basic definitions for OpenKalman as a whole.
Definition: extents.hpp:372