Boost C++ Libraries: Ticket #7067: The same options in the different groups cause exception while parsing configuration file. https://svn.boost.org/trac10/ticket/7067 <p> Preconditions: There are two option descriptions defined, containing the same options. The options are stored in the configuration file and grouped by the group. </p> <p> Result: options_descriptions add method adds two groups parse method throws unknown option exception with cat1.op1 </p> <p> namespace po::boost::program_options; void test() { po::options_description cat1("cat1"); cat1.add_options() </p> <blockquote> <p> ("op1", po::value&lt;std::string&gt;(), "op1") ("op2", po::value&lt;std::string&gt;(), "op2") ("op3", po::value&lt;std::string&gt;(), "op3") ("op4", po::value&lt;std::string&gt;(), "op4"); </p> </blockquote> <p> po::options_description cat2("cat2"); cat2.add_options() </p> <blockquote> <p> ("op1", po::value&lt;std::string&gt;(), "op1") ("op2", po::value&lt;std::string&gt;(), "op2") ("op3", po::value&lt;std::string&gt;(), "op3") ("op4", po::value&lt;std::string&gt;(), "op4"); </p> </blockquote> <p> po::options_description full("full"); full.add(cat1).add(cat2); </p> <p> po::variables_map map; </p> <p> boost::filesystem::path path("option.ini"); </p> <p> try { </p> <blockquote> <p> po::store(po::parse_config_file&lt;char&gt;("option.ini", full), map); <em>exception is thrown "Unknown option cat1.op1" po::notify(map); </em></p> </blockquote> <p> } catch(std::exception &amp; ex) { </p> <blockquote> <p> std::cout &lt;&lt; ex.what() &lt;&lt; std::endl; </p> </blockquote> <p> } </p> <p> option.ini: </p> <p> [cat1] </p> <blockquote> <p> op1=v1 op2=v2 op3=v3 op4=v4 </p> </blockquote> <p> [cat2] </p> <blockquote> <p> op1=v5 op2=v6 op3=v7 op4=v8 </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7067 Trac 1.4.3 g.andrejczuk@… Tue, 03 Jul 2012 14:01:03 GMT <link>https://svn.boost.org/trac10/ticket/7067#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7067#comment:1</guid> <description> <p> it also happens in boost 1.50.0 </p> </description> <category>Ticket</category> </item> </channel> </rss>