[program_options] A couple of proposed changes (patches included)

I've been making use of this library for the past week and it's been very helpful. I've found a couple of ways to improve it for my use and wanted to see if it'd be worth sending the changes upstream, too. 1) Allow default value specification at option query time. This would override the default value (if any) defined in the options_description for this particular query. buffer_size = options["buffer_size"].as<unsigned int>(1024); 2) Add the option name as a parameter to the "notifier" function signature. This became necessary when I started using the wildcard(*) functionality. How else am I to know what the matched config variable was? I just replaced boost::function1 with boost::function2. I imagine this one would need a bit more work since it would break any current users. I could take a stab at it, but if it seems useful, maybe someone more familiar with the library would rather take care of it instead. I'm pretty new to Boost development, so I'm not sure what the next steps would be. The attached patches are against the boost_1_45_0 release. -Josh

On Fri, Dec 10, 2010 at 12:18 PM, <jcwilson.boost@nym.hush.com> wrote:
I've been making use of this library for the past week and it's been very helpful. I've found a couple of ways to improve it for my use and wanted to see if it'd be worth sending the changes upstream, too.
[snip] Hi Josh, Please file issues at Trac, one for each patch, and attach the patches there so that they don't get lost. You can do this at https://svn.boost.org/trac/boost/ -- file the issues against the program_options component. Thanks very much. -- Dean Michael Berris deanberris.com
participants (2)
-
Dean Michael Berris
-
jcwilson.boost@nym.hush.com