Boost C++ Libraries: Ticket #4659: I have 4 new conversion chars I want https://svn.boost.org/trac10/ticket/4659 <p> I have already implemented these using the trunk from your subversion: </p> <p> 1). <strong>%B</strong> this prints out a bool as text true/false </p> <p> 2.a). <strong>%b</strong> prints out the integer, long what ever as a binary number. </p> <p> 2.b). <strong>%b(<em>&lt;sign&gt;&lt;base&gt;</em>)</strong> prints any integer argument as a base <strong><em>&lt;base&gt;</em></strong> number where <strong>2 &lt;= <em>&lt;base&gt;</em> &lt;= 36</strong>, if <strong><em>&lt;sign&gt;</em></strong> is <strong>-</strong> then use lowercase chars as digits if <strong><em>&lt;sign&gt;</em></strong> is <strong>+</strong> or nothing then use uppercase chars for the digits. </p> <p> 3). <strong>%r</strong> inspired by your own <strong>%t</strong> but <strong>%r</strong> repeats a space width times it does not do tabulation. </p> <p> 4). <strong>%R<em>c</em></strong> again inspired by <strong>%T<em>c</em></strong>,<strong> %R<em>c</em></strong> repeats char <strong><em>c</em></strong> width times, again it does not do tabulation. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4659 Trac 1.4.3 Francis (Grizzly) Smit <grizzly@…> Sun, 19 Sep 2010 08:38:04 GMT attachment set https://svn.boost.org/trac10/ticket/4659 https://svn.boost.org/trac10/ticket/4659 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patchfile.patch</span> </li> </ul> <p> made using "svn diff &gt; patchfile.patch", yep it's a patch file </p> Ticket Francis (Grizzly) Smit <grizzly@…> Sun, 19 Sep 2010 09:00:57 GMT <link>https://svn.boost.org/trac10/ticket/4659#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4659#comment:1</guid> <description> <p> I have also implemented a version of printf, and fprintf using C++0x's Variadic templates well I did two versions the first is feature rich but lacks the %1$ etc syntax the second uses boost::format to do the heavy lifting, and hence has that syntax, both are type safe, I also did a type safe version of scanf and fscanf, using Variadic templates those things rock, I have tested this against my patched format library and it works good :D I could attach the files if thats ok </p> </description> <category>Ticket</category> </item> <item> <dc:creator>James E. King, III</dc:creator> <pubDate>Sat, 14 Oct 2017 13:47:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4659#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4659#comment:2</guid> <description> <p> Any changes for non-standard extensions would need to be qualified with preprocessor guards. Bringing Boost.Format up to ISO C11 printf syntax rules is probably the next step, and then anything else like boolean, repeating extensions would need to be identified as non-standard and explicitly enabled, and I would be concerned about the extensions colliding with future standards. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>James E. King, III</dc:creator> <pubDate>Wed, 18 Oct 2017 13:28:37 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4659#comment:3 https://svn.boost.org/trac10/ticket/4659#comment:3 <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">wontfix</span> </li> </ul> <p> I like the idea of adding more functionality. Specifically I think that %b might make sense and %B might make sense, and I can see where there could be a printf compatible syntax for repeating, however what was suggested does not "end" in a conversion specifier and therefore would not be acceptable as a format string. I'm going to carry the boolean notion over to github issues and close this out. </p> Ticket James E. King, III Tue, 24 Oct 2017 18:33:09 GMT <link>https://svn.boost.org/trac10/ticket/4659#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4659#comment:4</guid> <description> <p> Note that %r and %R are unnecessary as you can use <a class="ext-link" href="http://en.cppreference.com/w/cpp/string/basic_string/basic_string"><span class="icon">​</span>http://en.cppreference.com/w/cpp/string/basic_string/basic_string</a>(constructor number 2) to make a string containing a character of a specific length. </p> <p> I will be submitting a PR for %b going to std::boolalpha today. %B does not work out, since std::ios_base::uppercase only applies to numeric conversion. </p> </description> <category>Ticket</category> </item> </channel> </rss>