Boost C++ Libraries: Ticket #12065: Boost program options throws an exception https://svn.boost.org/trac10/ticket/12065 <blockquote> <p> Linux 3.19.0-51-generic <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/58" title="#58: Tasks: Virtual Target Cache (closed: Fixed)">#58</a>-Ubuntu SMP Fri Feb 26 21:22:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Ubuntu 15.04 </p> </blockquote> <blockquote> <p> Boost 1.59 </p> </blockquote> <blockquote> <blockquote> <p> po::options_description desc("Allowed options"); desc.add_options() </p> <blockquote> <p> ("help,h", "produce help message") ("query,", po::value&lt;std::string&gt;(), "query for the search in the index") ("out,", po::value&lt;std::string&gt;(), "output file for commits parsing") </p> </blockquote> <p> ; </p> </blockquote> </blockquote> <blockquote> <blockquote> <p> po::positional_options_description p; p.add("verb", -1); </p> </blockquote> </blockquote> <blockquote> <blockquote> <p> po::variables_map vm; po::store(po::command_line_parser(ac, av). </p> <blockquote> <p> options(desc).positional(p).run(), vm); </p> </blockquote> <p> po::notify(vm); </p> </blockquote> </blockquote> <p> This snippet will throw an exception in the line options(desc).positional(p).run(), vm); </p> <p> This code works well with boost_1.55 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12065 Trac 1.4.3