IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 70014749 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

Merge branch '509-gcc12-does-not-compile-boost-1-76-0' into 'master'

Resolve "gcc12 does not compile boost 1.76.0"

Closes #509

See merge request !441
parents 25855934 d24174d6
No related branches found
No related tags found
1 merge request!441Resolve "gcc12 does not compile boost 1.76.0"
Pipeline #9870 passed with warnings
......@@ -9,5 +9,5 @@ if ! conan profile show corsika8 >/dev/null 2>/dev/null; then
conan profile update settings.compiler.libcxx=libstdc++11 corsika8
fi
fi
conan install -pr corsika8 --build=missing ${DIR}
# force rebuild of cubicinterpolation (see discussion in MR509)
conan install -pr corsika8 --build=missing --build=cubicinterpolation ${DIR}
......@@ -2,7 +2,7 @@
spdlog/1.9.2
catch2/2.13.8
eigen/3.3.8
boost/1.76.0
boost/1.78.0
zlib/1.2.11
proposal/7.4.2
yaml-cpp/0.7.0
......
......@@ -348,7 +348,7 @@ namespace corsika {
inline void Stack<StackData, MParticleInterface, MSecondaryProducer>::swap(
unsigned int const a, unsigned int const b) {
data_.swap(a, b);
std::swap(deleted_[a], deleted_[b]);
std::vector<bool>::swap(deleted_[a], deleted_[b]);
}
template <typename StackData, template <typename> typename MParticleInterface,
......
......@@ -13,10 +13,11 @@
namespace corsika {
EMThinning::EMThinning(HEPEnergyType threshold, double maxWeight, bool const eraseParticles)
EMThinning::EMThinning(HEPEnergyType threshold, double maxWeight,
bool const eraseParticles)
: threshold_{threshold}
, maxWeight_{maxWeight}
, eraseParticles_ {eraseParticles} {}
, eraseParticles_{eraseParticles} {}
template <typename TStackView>
void EMThinning::doSecondaries(TStackView& view) {
......@@ -79,11 +80,11 @@ namespace corsika {
// erase discared particles in case of multithinning
if (eraseParticles_) {
for (auto& p : view) {
if (auto const w = p.getWeight(); w == 0) { p.erase(); }
}
} else {
return;
for (auto& p : view) {
if (auto const w = p.getWeight(); w == 0) { p.erase(); }
}
} else {
return;
}
}
......
......@@ -28,7 +28,8 @@ namespace corsika {
* @param threshold: thinning applied below this energy
* @param maxWeight: maximum allowed weight
*/
EMThinning(HEPEnergyType threshold, double maxWeight, bool const eraseParticles=true);
EMThinning(HEPEnergyType threshold, double maxWeight,
bool const eraseParticles = true);
/**
* Apply thinning to secondaries. Only EM primaries with two EM secondaries are
......
......@@ -25,7 +25,8 @@ TEST_CASE("SaveHistogram") {
std::uniform_real_distribution<double> r{-3, 3};
auto h = bh::make_histogram(
bh::axis::regular{5, 0, 10, "normal"}, bh::axis::regular{3, 0, 4, "exponential"},
bh::axis::regular{5, 0., 10., "normal"},
bh::axis::regular{3, 0., 4., "exponential"},
bh::axis::category<int>{{2, 3, 5, 7}, "integer category"},
bh::axis::regular<double, bh::use_default, bh::use_default,
bh::axis::option::growth_t>{10, -1, 1, "integer category"});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment