Boost C++ Libraries: Ticket #3751: I suggest to substitute "multiple_sources.cpp" on an offered variant. https://svn.boost.org/trac10/ticket/3751 <p> The offered variant shows possibility of the assign in the command line of a filename of a configuration. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3751 Trac 1.4.3 Alex Bukreev <bucreev@…> Fri, 11 Dec 2009 08:23:43 GMT attachment set https://svn.boost.org/trac10/ticket/3751 https://svn.boost.org/trac10/ticket/3751 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">multiple_sources.cpp</span> </li> </ul> Ticket Sascha Ochsenknecht Fri, 11 Dec 2009 13:01:33 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3751#comment:1 https://svn.boost.org/trac10/ticket/3751#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58289" title="Enhance example, Fixes #3751, Patch from Alex Bukreev">[58289]</a>) Enhance example, Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3751" title="#3751: Feature Requests: I suggest to substitute &#34;multiple_sources.cpp&#34; on an offered variant. (closed: fixed)">#3751</a>, Patch from Alex Bukreev </p> Ticket Sascha Ochsenknecht Fri, 11 Dec 2009 13:04:38 GMT <link>https://svn.boost.org/trac10/ticket/3751#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3751#comment:2</guid> <description> <p> Thanks for enhancement. </p> <p> I did some small modifications (removed tabs, converted via dos2unix ...). There was also one problem: The value from command line is stored in config_file only after notify() call. I fixed that. </p> </description> <category>Ticket</category> </item> <item> <author>Alex Bukreev <bucreev@…></author> <pubDate>Fri, 11 Dec 2009 13:23:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3751#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3751#comment:3</guid> <description> <p> Excuse, but this example has entered in contradicted with new (very useful) property "required". After the first call "notify (vm)" the exception for the options which values are set in the configuration file will be generated. How to be now I do not know. Probably to enter new function for stock-taking of all demanded options. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Sascha Ochsenknecht</dc:creator> <pubDate>Fri, 11 Dec 2009 13:36:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3751#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3751#comment:4</guid> <description> <p> Hm, I'm not sure of what you're talking about? What exception do you mean? What do you try? </p> <p> Thanks, Sascha </p> </description> <category>Ticket</category> </item> <item> <author>Alex Bukreev <bucreev@…></author> <pubDate>Fri, 11 Dec 2009 13:45:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3751#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3751#comment:5</guid> <description> <p> if lines 47-48: "("optimization", po::value&lt;int&gt;(&amp;opt)-&gt;default_value(10),"optimization level")" change to: "("optimization", po::value&lt;int&gt;(&amp;opt)-&gt;required(),"optimization level")" and exec: multiple_sources.exe there will be an exception in lines 77 (first "notify(vm);"). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Sascha Ochsenknecht</dc:creator> <pubDate>Fri, 11 Dec 2009 13:54:15 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3751#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3751#comment:6</guid> <description> <p> Yes, the "required" check is done in notify(). </p> <p> You can try not to store in existing variables and then remove the first notify() call: </p> <pre class="wiki">("optimization", po::value&lt;int&gt;()-&gt;default_value(10),"optimization level") </pre><p> I'm going to check why values for existing variables are applied in notify() ... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Sascha Ochsenknecht</dc:creator> <pubDate>Fri, 11 Dec 2009 14:01:02 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/3751 https://svn.boost.org/trac10/ticket/3751 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">required_test.patch</span> </li> </ul> <p> example </p> Ticket Sascha Ochsenknecht Fri, 11 Dec 2009 14:01:39 GMT <link>https://svn.boost.org/trac10/ticket/3751#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3751#comment:7</guid> <description> <p> see attached file required_test.patch for better understanding. </p> </description> <category>Ticket</category> </item> <item> <author>Alex Bukreev <bucreev@…></author> <pubDate>Fri, 11 Dec 2009 16:30:56 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3751#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3751#comment:8</guid> <description> <p> Thanks for patch. But it does not work. The default value comes back. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Sascha Ochsenknecht</dc:creator> <pubDate>Fri, 11 Dec 2009 17:01:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3751#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3751#comment:9</guid> <description> <p> Hm, I can not reproduce, debugger shows that config_file is set correctly after the following line: </p> <pre class="wiki"> string config_file = vm["config"].as&lt; string &gt;(); </pre><p> (default if not given on command line, otherwise set to value given on command line. I use current trunk version </p> </description> <category>Ticket</category> </item> <item> <author>bucreev@…</author> <pubDate>Fri, 11 Dec 2009 20:41:51 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3751#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3751#comment:10</guid> <description> <p> Excuse. I did not set parametre in the command line, therefore and received "defaulted ()". </p> </description> <category>Ticket</category> </item> <item> <author>bucreev@…</author> <pubDate>Fri, 11 Dec 2009 20:45:18 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3751#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3751#comment:11</guid> <description> <p> I suggest to enter your code as an example "multiple_sources.cpp". </p> </description> <category>Ticket</category> </item> </channel> </rss>