Ticket #2782 (closed Bugs: fixed)
boost::program_options::notify crashes when variables_map contains user inserted values
|Reported by:||boost@…||Owned by:||vladimir_prus|
variables_map is useful as a generic properties map (esp. due to its various parsers). But when variables_map contains user inserted values (a properties map would support adding/setting values. variables_map does allow base std::map::insert being called), notify would crash/segfault/die due to m_value_semantic being null (empty shared_ptr).
I suggest that a simple check be added to the notify function before calling (*it).second.m_value_semantic->notify()
This would make it a lot more convenient for those who build a properties wrapper around program_options. Thanks.
- Owner set to vladimir_prus
- Component changed from None to program_options