File indexing completed on 2024-09-07 04:36:26
0001 #ifndef FWCore_SOA_tablehelpers_h
0002 #define FWCore_SOA_tablehelpers_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include <type_traits>
0022 #include <tuple>
0023
0024
0025
0026
0027
0028 namespace edm {
0029 namespace soa {
0030 namespace impl {
0031
0032 template <int I>
0033 struct FoundIndex {
0034 static constexpr int index = I;
0035 };
0036
0037 template <int I, typename T, typename TPL>
0038 struct GetIndex {
0039 static constexpr int index = std::conditional<std::is_same<T, typename std::tuple_element<I, TPL>::type>::value,
0040 FoundIndex<I>,
0041 GetIndex<I + 1, T, TPL>>::type::index;
0042 };
0043
0044 }
0045 }
0046 }
0047
0048 #endif