ATLAS Offline Software
ArrayHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef CXXUTILS_ARRAY_HELPER
5 #define CXXUTILS_ARRAY_HELPER
6 #include <array>
7 #include <stddef.h>
8 
10 template<class T, size_t N> constexpr std::array<T, N> make_array(const T& def_val) {
11  std::array<T,N> arr{};
12  arr.fill(def_val);
13  return arr;
14 }
15 #endif
make_array
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
Definition: ArrayHelper.h:10
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35