![]() |
|
|||
File indexing completed on 2025-08-05 08:08:20
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 template <typename T, std::size_t N> 0019 constexpr std::array<T, N> filledArray(const T& defVal) { 0020 std::array<T, N> arr{}; 0021 arr.fill(defVal); 0022 return arr; 0023 } 0024 } // 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 |
![]() ![]() |