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 for the latest Boost documentation.

Class template basic_option

boost::program_options::basic_option —


template<typename charT> 
class basic_option {
// construct/copy/destruct
basic_option(const std::string &, const std::vector< std::string > &);

// public member functions

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 construct/copy/destruct

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

basic_option public member functions

    Copyright 2002-2004 Vladimir Prus