Boost C++ Libraries: Ticket #4700: Code bloat and slowing down compilation https://svn.boost.org/trac10/ticket/4700 <ol><li>Function basic_format::operator%(const T&amp; x) generate distinct bits for every type. It is too redundant to instantiate them for every "const char [N]"! For example, one for "a", one for "ab", one for "abc" and so on. Here is a patch: </li></ol><pre class="wiki"> template&lt;int N_&gt; basic_format&amp; operator%(char const (&amp;x)[N_]) { return io::detail::feed&lt;CharT, Tr, Alloc, char const * const&amp;&gt;(*this,(char const * const&amp;)x); } </pre><ol start="2"><li>I use Boost.Format for i18n (heavily); just #include &lt;boost/format.hpp&gt; and one (!) using of boost::format() gets over 400kb in object code and ~0.4 sec slowness (for gcc). So I want to include only &lt;boost/format/format_class.hpp&gt; (declaration only) and instantiate types in a distinct source. </li></ol><p> But &lt;boost/format/format_class.hpp&gt; is not self all-sufficient. I have to include something like this: </p> <pre class="wiki">#include &lt;boost/config.hpp&gt; #ifndef BOOST_NO_STD_LOCALE #include &lt;locale&gt; #endif #include &lt;boost/format/format_class.hpp&gt; </pre><p> Fix it please. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4700 Trac 1.4.3 Steven Watanabe Sun, 14 Oct 2012 19:17:28 GMT <link>https://svn.boost.org/trac10/ticket/4700#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4700#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/80987" title="Add #include &lt;locale&gt;. Refs #4700.">[80987]</a>) Add #include &lt;locale&gt;. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4700" title="#4700: Feature Requests: Code bloat and slowing down compilation (closed: fixed)">#4700</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Mon, 15 Oct 2012 01:28:55 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4700#comment:2 https://svn.boost.org/trac10/ticket/4700#comment:2 <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/80989" title="Reduce code bloat from boost::format. Fixes #4700.">[80989]</a>) Reduce code bloat from boost::format. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4700" title="#4700: Feature Requests: Code bloat and slowing down compilation (closed: fixed)">#4700</a>. </p> Ticket