@@ -148,7 +148,7 @@ void OptionsParser<Options>::Implies(const std::string& from,
148
148
CHECK_NE (it, options_.end ());
149
149
CHECK_EQ (it->second .type , kBoolean );
150
150
implications_.emplace (from, Implication {
151
- std::static_pointer_cast<OptionField< bool >>( it->second .field ) , true
151
+ it->second .field , true
152
152
});
153
153
}
154
154
@@ -159,7 +159,7 @@ void OptionsParser<Options>::ImpliesNot(const std::string& from,
159
159
CHECK_NE (it, options_.end ());
160
160
CHECK_EQ (it->second .type , kBoolean );
161
161
implications_.emplace (from, Implication {
162
- std::static_pointer_cast<OptionField< bool >>( it->second .field ) , false
162
+ it->second .field , false
163
163
});
164
164
}
165
165
@@ -205,8 +205,7 @@ auto OptionsParser<Options>::Convert(
205
205
typename OptionsParser<ChildOptions>::Implication original,
206
206
ChildOptions* (Options::* get_child)()) {
207
207
return Implication {
208
- std::static_pointer_cast<OptionField<bool >>(
209
- Convert (original.target_field , get_child)),
208
+ Convert (original.target_field , get_child),
210
209
original.target_value
211
210
};
212
211
}
@@ -378,8 +377,10 @@ void OptionsParser<Options>::Parse(
378
377
379
378
{
380
379
auto implications = implications_.equal_range (name);
381
- for (auto it = implications.first ; it != implications.second ; ++it)
382
- *it->second .target_field ->Lookup (options) = it->second .target_value ;
380
+ for (auto it = implications.first ; it != implications.second ; ++it) {
381
+ *it->second .target_field ->template Lookup <bool >(options) =
382
+ it->second .target_value ;
383
+ }
383
384
}
384
385
385
386
const OptionInfo& info = it->second ;
0 commit comments