Boost logo

Boost :

From: David Greene (greened_at_[hidden])
Date: 2006-03-27 15:56:10


Is there a specific reason that parse_command_line has this
signature?

template<typename charT>
  basic_parsed_options< charT >
  parse_command_line(int argc,
                     charT * argv,
                     ^^^^^^^ Should this be charT **?
                     const options_description & ,
                     int style = 0,
                     function1< std::pair< std::string, std::string >,
                                const std::string & > ext =
                                 ext_parser());

This makes parsing nested options (i.e. --param="some more options")
unnecessarily difficult. It would be easier if it looked like this:

template<typename Int, typename Buf>
  basic_parsed_options< charT >
  parse_command_line(Int argc,
                     Buf argv,
                     const options_description & ,
                     int style = 0,
                     function1< std::pair< std::string, std::string >,
                                const std::string & > ext =
                                 ext_parser());

This way I can use the boost string algorithms to tokenize the
suboption string and pass it into another invocation of
parse_command_line.

Thoughts? Complaints? Smacks upside the head?

                                -Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk