
I tried using
bpo::options_description desc("Allowed options"); desc.add_options() (HELP, "produce help message");
but this fails to compile because HELP is an std::string.
Isn't that a bit too restrictive? Last I checked, boost::program_options took const char* in several
Thorsten Ottosen wrote: places where it would end up storing them as std::strings anyway. Taking "const std::string&" would also clarify that passing temporary strings is fine, whereas "const char*" as an arg hints to me that the pointers should remain valid until options_description is destroyed (purely question of taste though). I'd vote to replace const char* everywhere in the program options interface with std::string. (excluding the "char* argv[]" of course) My 5c, Matthew