ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
at_index.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file at_index.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2018 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 namespace Acts {
12 namespace detail {
24 template <typename T, size_t index, T... values>
25 struct at_index;
26 
28 template <typename T, size_t index, T next, T... others>
29 struct at_index<T, index, next, others...> {
30  static constexpr T value = at_index<T, index - 1, others...>::value;
31 };
32 
33 template <typename T, T next, T... others>
34 struct at_index<T, 0, next, others...> {
35  static constexpr T value = next;
36 };
38 } // namespace detail
40 } // namespace Acts