Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Class template basic_option



template<typename charT> 
class basic_option {
  // construct/copy/destruct
  basic_option(const std::string &, const std::vector< std::string > &);
  std::string string_key;
  int position_key;
  std::vector< std::basic_string< charT > > value;
  std::vector< std::basic_string< charT > > original_tokens;
  bool unregistered;


Option found in input source. Contains a key and a value. The key, in turn, can be a string (name of an option), or an integer (position in input source) -- in case no name is specified. The latter is only possible for command line. The template parameter specifies the type of char used for storing the option's value.

basic_option public construct/copy/destruct

  1. basic_option();
  2. basic_option(const std::string & string_key, 
                 const std::vector< std::string > & value);