Tatooine
field_type_traits.h
Go to the documentation of this file.
1#ifndef TATOOINE_FIELD_TYPE_TRAITS_H
2#define TATOOINE_FIELD_TYPE_TRAITS_H
3//==============================================================================
4#include <tatooine/field.h>
5//==============================================================================
6namespace tatooine{
7//==============================================================================
8template <typename Field>
9using field_real_type = typename std::decay_t<
10 std::remove_pointer_t<std::decay_t<Field>>>::real_type;
11//==============================================================================
12template <typename Field>
13using field_tensor_type = typename std::decay_t<
14 std::remove_pointer_t<std::decay_t<Field>>>::tensor_type;
15//==============================================================================
16template <typename Field>
17using field_pos_type = typename std::decay_t<
18 std::remove_pointer_t<std::decay_t<Field>>>::pos_type;
19//==============================================================================
20template <typename Field>
21static constexpr auto field_num_dimensions =
22 std::decay_t<std::remove_pointer_t<std::decay_t<Field>>>::num_dimensions();
23//==============================================================================
24} // namespace tatooine
25//==============================================================================
26#endif
Definition: algorithm.h:6
static constexpr auto field_num_dimensions
Definition: field_type_traits.h:21
typename std::decay_t< std::remove_pointer_t< std::decay_t< Field > > >::pos_type field_pos_type
Definition: field_type_traits.h:18
typename std::decay_t< std::remove_pointer_t< std::decay_t< Field > > >::real_type field_real_type
Definition: field_type_traits.h:10
typename std::decay_t< std::remove_pointer_t< std::decay_t< Field > > >::tensor_type field_tensor_type
Definition: field_type_traits.h:14