|
|
|||
File indexing completed on 2025-12-14 09:39:48
0001 // This file is part of the ACTS project. 0002 // 0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 0011 #include <array> 0012 0013 namespace Acts { 0014 /// @brief creates an array of type T and size N and assigns all elements to the parsed 0015 /// default value def_val. This basically allows for inline construction 0016 /// and initialization of class-member arrays 0017 /// @param defVal: Default value to assign 0018 /// @return Array filled with the default value 0019 template <typename T, std::size_t N> 0020 constexpr std::array<T, N> filledArray(const T& defVal) { 0021 std::array<T, N> arr{}; 0022 arr.fill(defVal); 0023 return arr; 0024 } 0025 } // namespace Acts
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|