Belle II Software development
TupleGenerate.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tuple>
11#include <utility>
12
13namespace Belle2 {
18 namespace TrackFindingCDC {
19
21 template< template<size_t> class AGenerator, class AIndexSequence>
23
25 template< template<size_t> class AGenerator, size_t ... Is>
26 struct TupleGenerateImpl<AGenerator, std::index_sequence<Is...> > {
28 using type = std::tuple<AGenerator<Is>...>;
29 };
30
32 template< template<size_t> class AFunction, class AIndexSequence>
33 using TupleGenerate = typename TupleGenerateImpl<AFunction, AIndexSequence>::type;
34
36 template< template<size_t> class AFunction, size_t N>
37 using TupleGenerateN = TupleGenerate<AFunction, std::make_index_sequence<N> >;
38 }
40}
Abstract base class for different kinds of events.
STL namespace.
std::tuple< AGenerator< Is >... > type
Result sequence of the function application.
Definition: TupleGenerate.h:28
Apply the template function F to each element of the index sequence.
Definition: TupleGenerate.h:22