Boost logo

Boost Users :

From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-05-29 13:10:38


On Thu, May 29, 2008 at 8:16 AM, John Femiani <JOHN.FEMIANI_at_[hidden]> wrote:
> I second that -- I am quite curious about how much overhead various
> headers/libraries impose when you include tham, and when you actually
> use them (which seems to be a lot more expensive on msvc). Quick
> compile-test-correct cycles are important to me. I don't know the best
> way to even measure this.

In my opinion it is pointless to measure compile times. Instead,
headers should be designed in a way that allows user code to not "see"
anything that is not strictly necessary to compile a particular user
cpp file.

Back to boost::filesystem, I see two problems:

- It uses very few headers which makes it impossible to #include a
small bit of it.

- The path and wpath types are in fact typedefs of the basic_path
template and this makes using incomplete path references rather
clunky. One has to write:

#include <string>

namespace boost
{
  namespace filesystem
  {
    template <class,class> class basic_path;
    struct path_traits;
    typedef basic_path<std::string,path_traits> path;
  }
}

One solution is to put something like the above definitions in a
separate boost header file but I would much prefer if I could simply
say namespace boost { namespace filesystem { class path; } } in my
headers.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net