Skip to content

Commit

Permalink
fix: make boost version checks work and use optimized range insertion (
Browse files Browse the repository at this point in the history
…#3515)

Adds the boost version header in several places, since missing `BOOST_VERSION` macro seems to silently pass the version comparison. Also use an optimized range insertion in one place.
  • Loading branch information
benjaminhuth authored Aug 20, 2024
1 parent a28acc3 commit 337343f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Examples/Algorithms/Geant4/src/Geant4Simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include <G4VUserPhysicsList.hh>
#include <G4Version.hh>
#include <Randomize.hh>
#include <boost/version.hpp>

ActsExamples::Geant4SimulationBase::Geant4SimulationBase(
const Config& cfg, std::string name, Acts::Logging::Level level)
Expand Down
1 change: 1 addition & 0 deletions Examples/Algorithms/Geant4/src/SensitiveSteppingAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <G4UnitsTable.hh>
#include <G4VPhysicalVolume.hh>
#include <G4VTouchable.hh>
#include <boost/version.hpp>

class G4PrimaryParticle;

Expand Down
7 changes: 6 additions & 1 deletion Examples/Framework/include/ActsExamples/EventData/Index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@

#pragma once

#include <algorithm>
#include <cstdint>

#include <boost/container/flat_map.hpp>
#include <boost/version.hpp>

namespace ActsExamples {

Expand Down Expand Up @@ -53,8 +55,11 @@ inline boost::container::flat_multimap<value_t, Index> invertIndexMultimap(
inverse.insert(i);
}
#else
inverse.insert(unordered.begin(), unordered.end());
std::sort(unordered.begin(), unordered.end());
inverse.insert(boost::container::ordered_range_t{}, unordered.begin(),
unordered.end());
#endif

return inverse;
}

Expand Down
1 change: 1 addition & 0 deletions Examples/Scripts/MaterialMapping/MaterialComposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <TApplication.h>
#include <boost/program_options.hpp>
#include <boost/version.hpp>
#include <nlohmann/json.hpp>

#define BOOST_AVAILABLE 1
Expand Down
1 change: 1 addition & 0 deletions Examples/Scripts/TrackingPerformance/TrackSummary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <TApplication.h>
#include <boost/program_options.hpp>
#include <boost/version.hpp>
#include <nlohmann/json.hpp>

#define BOOST_AVAILABLE 1
Expand Down

0 comments on commit 337343f

Please sign in to comment.