boost::program_options - undocumented "*" feature

21 Jan
2013
21 Jan
'13
1:45 p.m.
I recently discovered an undocumented feature of
`boost::program_options`, namely that it accepts "*" as a special
wildcard that allows declaration of a group of options with the same
prefix, like this:
configOptions.add_options()
("item_*", value<int>(), "items");
This declaration worked as expected and recognized `item_1`, `item_3`,
etc, while rejecting unknown options.
Well now the question is, how can I write a custom validate function
that will populate a map with options key and its value, like this:
map
4415
Age (days ago)
4415
Last active (days ago)
0 comments
1 participants
participants (1)
-
ST