File tree Expand file tree Collapse file tree
include/boost/program_options Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,6 +153,9 @@ namespace boost { namespace program_options {
153153 // Resolve conflict between inherited operators.
154154 const variable_value& operator [](const std::string& name) const
155155 { return abstract_variables_map::operator [](name); }
156+
157+ // Override to clear some extra fields.
158+ void clear ();
156159
157160 void notify ();
158161
Original file line number Diff line number Diff line change @@ -182,6 +182,13 @@ namespace boost { namespace program_options {
182182 : abstract_variables_map(next)
183183 {}
184184
185+ void variables_map::clear ()
186+ {
187+ std::map<std::string, variable_value>::clear ();
188+ m_final.clear ();
189+ m_required.clear ();
190+ }
191+
185192 const variable_value&
186193 variables_map::get (const std::string& name) const
187194 {
You can’t perform that action at this time.
0 commit comments