File tree Expand file tree Collapse file tree
Examples/Detectors/MuonSpectrometerMockupDetector/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515#include < format>
1616#include < iostream>
17- #include < variant >
17+ #include < any >
1818
1919#include < GeoModelWrite/WriteGeoModel.h>
2020
@@ -169,14 +169,14 @@ ActsPlugins::GeoModelTree GeoMuonMockupExperiment::constructMS() {
169169 VolumeMap_t publishedVol{};
170170 for (const auto & [fpV, pubKey] : m_publisher->getPublishedFPV ()) {
171171 try {
172- const auto key = std::get <std::string>(pubKey);
172+ const auto key = std::any_cast <std::string>(pubKey);
173173 if (!publishedVol
174174 .insert (std::make_pair (key, static_cast <GeoFullPhysVol*>(fpV)))
175175 .second ) {
176176 throw std::invalid_argument (" GeoMuonMockupExperiment() - Key " + key +
177177 " is no longer unique" );
178178 }
179- } catch (const std::bad_variant_access & e) {
179+ } catch (const std::bad_any_cast & e) {
180180 throw std::domain_error (
181181 " GeoMuonMockupExperiment() - Failed to cast the key to string " +
182182 std::string{e.what ()});
You can’t perform that action at this time.
0 commit comments