From 8925fb52f9619b11165b2d9a1e58033b694e53b7 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 18 Oct 2024 08:47:28 -0500 Subject: [PATCH] fix: `#include ` in HoughTransformUtils for `std::sort` (#3758) With gcc-14, the following compilation failure is reported: ``` 438 In file included from /home/wdconinc/git/acts/Core/include/Acts/Seeding/HoughTransformUtils.hpp:374, 439 from /home/wdconinc/git/acts/Examples/Algorithms/TrackFinding/include/ActsExamples/TrackFinding/MuonHoughSeeder.hpp:12, 440 from /home/wdconinc/git/acts/Examples/Algorithms/TrackFinding/src/MuonHoughSeeder.cpp:9: 441 /home/wdconinc/git/acts/Core/include/Acts/Seeding/HoughTransformUtils.ipp: In member function 'std::vector::Maximum> Acts::HoughTransformUtils::PeakFind ers::IslandsAroundMax::findPeaks(const Acts::HoughTransformUtils::HoughPlane&, const Acts::HoughTransformUtils::HoughAxisRanges&)': >> 442 /home/wdconinc/git/acts/Core/include/Acts/Seeding/HoughTransformUtils.ipp:224:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 443 224 | std::sort(candidates.begin(), candidates.end(), 444 | ^~~~ 445 | qsort >> 446 make[2]: *** [Examples/Algorithms/TrackFinding/CMakeFiles/ActsExamplesTrackFinding.dir/build.make:177: Examples/Algorithms/TrackFinding/CMakeFiles/ActsExamplesTrackFinding.dir/src/MuonHoughSeeder.cpp.o] Error 1 447 make[2]: *** Waiting for unfinished jobs.... ``` This appears to be due to a missing `#include ` before the use of `std::sort` in the `.ipp` file. This PR adds the `algorithm` header to the `.hpp` file. --- Core/include/Acts/Seeding/HoughTransformUtils.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/include/Acts/Seeding/HoughTransformUtils.hpp b/Core/include/Acts/Seeding/HoughTransformUtils.hpp index a7a84d8908c..4fcece48034 100644 --- a/Core/include/Acts/Seeding/HoughTransformUtils.hpp +++ b/Core/include/Acts/Seeding/HoughTransformUtils.hpp @@ -14,6 +14,7 @@ #include "Acts/Utilities/Logger.hpp" #include "Acts/Utilities/Result.hpp" +#include #include #include #include