Boost C++ Libraries: Ticket #3732: Detect platform to choose delimiter to use for reading options from command line https://svn.boost.org/trac10/ticket/3732 <p> POSIX systems usually use - or -- as a "delimiter" when reading options from command lines. For e.g. the 'ls' program on a linux system: </p> <pre class="wiki"> ls --help .... -a, --all do not ignore entries starting with . -A, --almost-all do not list implied . and .. --author with -l, print the author of each file -b, --escape print octal escapes for nongraphic characters --block-size=SIZE use SIZE-byte blocks --help print this .... </pre><p> Windows usually uses the / character instead, for e.g. for dir: dir /?: Typically, the '/' is the delimiter. </p> <pre class="wiki"> ... /B Uses bare format (no heading information or summary). ... </pre><p> It would be useful to have the library recognize the platform on which it is begin compiled (or even better, the platform being targeted) and use the default for that platform for reading options from the command line. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3732 Trac 1.4.3 Sascha Ochsenknecht Wed, 09 Dec 2009 09:52:58 GMT <link>https://svn.boost.org/trac10/ticket/3732#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3732#comment:1</guid> <description> <p> Hi, </p> <p> I'm not so much familiar with other style than Linux/POSIX. </p> <p> In program_options/parsers.hpp is a style enum defined, the default is set to unix_style which is: </p> <pre class="wiki"> unix_style = (allow_short | short_allow_adjacent | short_allow_next | allow_long | long_allow_adjacent | long_allow_next | allow_sticky | allow_guessing | allow_dash_for_short) </pre><p> How would it look like for Windows (ar long options allowed for windows....)? What other style's do we have (MacOS, ...) ? </p> <p> Thanks, Sascha </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Sascha Ochsenknecht</dc:creator> <pubDate>Wed, 09 Dec 2009 10:02:44 GMT</pubDate> <title>cc set https://svn.boost.org/trac10/ticket/3732#comment:2 https://svn.boost.org/trac10/ticket/3732#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">s.ochsenknecht@…</span> added </li> </ul> Ticket anonymous Wed, 09 Dec 2009 11:06:32 GMT <link>https://svn.boost.org/trac10/ticket/3732#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3732#comment:3</guid> <description> <p> can the user actually change this default library-wide ? without changing the library source code of course. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Sascha Ochsenknecht</dc:creator> <pubDate>Wed, 09 Dec 2009 11:24:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3732#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3732#comment:4</guid> <description> <p> It is an optional parameter of e.g. parse_command_line(): <a href="http://www.boost.org/doc/libs/1_41_0/doc/html/boost/program_options/parse_command_line.html">http://www.boost.org/doc/libs/1_41_0/doc/html/boost/program_options/parse_command_line.html</a> </p> <p> If you pass a user defined styl;e, then this is used instead of default_style (which is actually unix_style). </p> </description> <category>Ticket</category> </item> </channel> </rss>