Reactions  0.0.0
Handling reaction trees and decays
utils.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <tuple>
3 
5 namespace reactions::utils {
6 
8  namespace detail {
10  template <std::size_t I, class Tuple, class E0, class E1>
11  struct tuple_index {
12  static constexpr auto value =
13  tuple_index<I + 1, Tuple, E0,
14  std::tuple_element_t<I + 1, Tuple>>::value;
15  };
16 
18  template <std::size_t I, class Tuple, class E>
19  struct tuple_index<I, Tuple, E, E> {
20  static constexpr auto value = I;
21  };
22  } // namespace detail
23 
25  template <class Tuple, class E> struct tuple_index {
26  static constexpr auto value =
28  };
29 
31  template <class Tuple, class E>
33 } // namespace reactions::utils
General utilities.
Definition: utils.hpp:5
static constexpr auto value
Definition: utils.hpp:12
Index corresponding to a given element.
Definition: utils.hpp:25
Index corresponding to a given element.
Definition: utils.hpp:11
static constexpr auto tuple_index_v
Index corresponding to a given element.
Definition: utils.hpp:32