title: Boost program options- crash on parsing command line
body: <p>I have the following boost::program_options program.</p>
  
  <pre><code>boost::program_options::options_description opts("Allowed options");
  opts.add_options()
      ("help", "produce help message"),
      ("mingw", boost::program_options::value&lt;std::string&gt;(), "Set the install path for MinGW"),
      ("triple", boost::program_options::value&lt;std::string&gt;(), "Set the target triple"),
      ("output", boost::program_options::value&lt;std::string&gt;(), "Set the output file"),
      ("input", boost::program_options::value&lt;std::vector&lt;std::string&gt;&gt;(), "Set an input file."),
      ("include", boost::program_options::value&lt;std::vector&lt;std::string&gt;&gt;(), "Set an include path.")
  ;
  
  boost::program_options::positional_options_description posopts;
  posopts.add("input", -1);
  
  boost::program_options::variables_map vm;
  try {
      boost::program_options::store(boost::program_options::command_line_parser(argc, argv).options(opts).positional(posopts).run(), vm);
  } catch(std::exception&amp; e) {
      std::cout &lt;&lt; e.what();
      std::cin.get();
  }
  boost::program_options::notify(vm);
  
  if (vm.find("help") != vm.end()) {
      std::cout &lt;&lt; opts &lt;&lt; "\n";
      std::cin.get();
      return 1;
  }
  // Actual program logic
  </code></pre>
  
  <p>However, when I specify <code>--mingw="stuff"</code> on the command line, I found that it was rejected. After issuing the <code>--help</code> command, it seems that only the first option of the options in the list was actually registered with <code>opts</code>- even though chaining it in this way is what the tutorial recommends.</p>
  
  <p>What's going wrong with this simple sample program? It's basically direct from the tutorial.</p>