From 48a26eecf3f5a15846ccbe4bfbd580153d455076 Mon Sep 17 00:00:00 2001 From: Paul Gessinger Date: Fri, 16 Aug 2024 14:13:14 +0200 Subject: [PATCH] fix a few GCC12 build issues --- Core/include/Acts/Definitions/Algebra.hpp | 2 +- Core/include/Acts/Utilities/GridBinFinder.hpp | 7 ++++--- Core/include/Acts/Utilities/GridBinFinder.ipp | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Core/include/Acts/Definitions/Algebra.hpp b/Core/include/Acts/Definitions/Algebra.hpp index a8b54653d23..fa5edcc2252 100644 --- a/Core/include/Acts/Definitions/Algebra.hpp +++ b/Core/include/Acts/Definitions/Algebra.hpp @@ -12,7 +12,7 @@ #if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmisleading-indentation" -#if __GNUC__ == 13 +#if __GNUC__ >= 12 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #endif #include diff --git a/Core/include/Acts/Utilities/GridBinFinder.hpp b/Core/include/Acts/Utilities/GridBinFinder.hpp index 9d57790459d..da2f9ecbfde 100644 --- a/Core/include/Acts/Utilities/GridBinFinder.hpp +++ b/Core/include/Acts/Utilities/GridBinFinder.hpp @@ -29,6 +29,7 @@ namespace Acts { template class GridBinFinder { public: + static constexpr std::size_t dimCubed = Acts::detail::ipow(3, DIM); /// @brief Constructor /// @tparam args ... Input parameters provided by the user /// @@ -63,9 +64,9 @@ class GridBinFinder { /// /// @pre The provided local position must be a valid local bins configuration in the grid template - boost::container::small_vector - findBins(const std::array& locPosition, - const Acts::Grid& grid) const; + boost::container::small_vector findBins( + const std::array& locPosition, + const Acts::Grid& grid) const; private: /// @brief Store the values provided by the user for each axis in the grid diff --git a/Core/include/Acts/Utilities/GridBinFinder.ipp b/Core/include/Acts/Utilities/GridBinFinder.ipp index 082a8efc475..344ef07137c 100644 --- a/Core/include/Acts/Utilities/GridBinFinder.ipp +++ b/Core/include/Acts/Utilities/GridBinFinder.ipp @@ -62,10 +62,10 @@ std::array, DIM> Acts::GridBinFinder::getSizePerAxis( template template -boost::container::small_vector -Acts::GridBinFinder::findBins( +auto Acts::GridBinFinder::findBins( const std::array& locPosition, - const Acts::Grid& grid) const { + const Acts::Grid& grid) const + -> boost::container::small_vector { static_assert(sizeof...(Axes) == DIM); assert(isGridCompatible(grid)); std::array, DIM> sizePerAxis =