Belle II Software  release-05-02-19
TupleGenerate.h
1 /**************************************************************************
2 * BASF2 (Belle Analysis Framework 2) *
3 * Copyright(C) 2015 - Belle II Collaboration *
4 * *
5 * Author: The Belle II Collaboration *
6 * Contributors: Oliver Frost *
7 * *
8 * This software is provided "as is" without any warranty. *
9 **************************************************************************/
10 #pragma once
11 
12 #include <tuple>
13 #include <utility>
14 
15 namespace Belle2 {
20  namespace TrackFindingCDC {
21 
23  template< template<size_t> class AGenerator, class AIndexSequence>
24  struct TupleGenerateImpl {};
25 
27  template< template<size_t> class AGenerator, size_t ... Is>
28  struct TupleGenerateImpl<AGenerator, std::index_sequence<Is...> > {
30  using type = std::tuple<AGenerator<Is>...>;
31  };
32 
34  template< template<size_t> class AFunction, class AIndexSequence>
35  using TupleGenerate = typename TupleGenerateImpl<AFunction, AIndexSequence>::type;
36 
38  template< template<size_t> class AFunction, size_t N>
39  using TupleGenerateN = TupleGenerate<AFunction, std::make_index_sequence<N> >;
40  }
42 }
Belle2::TrackFindingCDC::TupleGenerateImpl
Apply the template function F to each element of the index sequence.
Definition: TupleGenerate.h:32
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19