[Boost-bugs] [Boost C++ Libraries] #4700: Code bloat and slowing down compilation

Subject: [Boost-bugs] [Boost C++ Libraries] #4700: Code bloat and slowing down compilation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-30 21:35:42

#4700: Code bloat and slowing down compilation
 Reporter: Ilya Murav'jov <muravev@…> | Owner: samuel_krempp
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: format
  Version: Boost 1.44.0 | Severity: Optimization
 Keywords: |
 1. Function basic_format::operator%(const T& 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:

         template<int N_>
         basic_format& operator%(char const (&x)[N_])
             { return io::detail::feed<CharT, Tr, Alloc, char const *
 const&>(*this,(char const * const&)x); }


 2. I use Boost.Format for i18n (heavily); just #include <boost/format.hpp>
 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
 <boost/format/format_class.hpp> (declaration only) and instantiate types
 in a distinct source.
 But <boost/format/format_class.hpp> is not self all-sufficient. I have to
 include something like this:

 #include <boost/config.hpp>

 #include <locale>

 #include <boost/format/format_class.hpp>
 Fix it please.

Ticket URL: <https://svn.boost.org/trac/boost/ticket/4700>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC