File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -517,13 +517,22 @@ namespace dd4hep {
517
517
const T& get (const std::string& key) const {
518
518
auto it = variantParameters.find (key);
519
519
if (it == variantParameters.end ()) {
520
- throw std::runtime_error{" Key " +key+" not found" };
520
+ throw std::runtime_error{" Key " +key+" not found" };
521
521
}
522
522
return boost::get<T>(it->second );
523
523
}
524
524
525
525
template <typename T>
526
- T value_or (const std::string& key, T alternative) {
526
+ T& get (const std::string& key) {
527
+ auto it = variantParameters.find (key);
528
+ if (it == variantParameters.end ()) {
529
+ throw std::runtime_error{" Key " +key+" not found" };
530
+ }
531
+ return boost::get<T>(it->second );
532
+ }
533
+
534
+ template <typename T>
535
+ T value_or (const std::string& key, T alternative) const {
527
536
auto it = variantParameters.find (key);
528
537
if (it == variantParameters.end ()) {
529
538
return alternative;
You can’t perform that action at this time.
0 commit comments