title: Does boost::program_options support requiring one of a series of alternatives?
body: <p>I'm using the boost::program_options to specify the arguments to my C++ application.  Is there a way to specify that one argument is required from a set of alternatives?</p>
  
  <pre><code>&lt;application&gt; [--one int-value1 | --two string-value2 | --three]
  </code></pre>
  
  <p>In the above, the user must pass exactly one of the alternatives: <code>--one</code>, <code>--two</code>, or <code>--three</code>.</p>
  
  <p>I could do this manually, but hope there is a built-in mechanism instead of this:</p>
  
  <pre><code>#include &lt;boost/program_options.hpp&gt;
  
  namespace po = boost::program_options;
  
  int main(int argc, char *argv[]) {
    po::options_description options;
    int band;
    std::string titles_path;
  
    options.add_options()
      ("one", po::value&lt;int&gt;(&amp;band)-&gt;default_value(1))
      ("two", po::value&lt;std::string&gt;(&amp;titles_path))
      ("three");
  
    po::variables_map vm;
    po::store(po::parse_command_line(argc, argv, options), vm);
  
    if (1 != (vm.count("one") + vm.count("two") + vm.count("three"))) {
      std::cerr &lt;&lt; options &lt;&lt; std::endl;
  
      return -11;
    }
    return 0;
  }
  </code></pre>
  
  <p>Is there a better way to do this with boost options?</p>