Boost logo

Boost :

Subject: Re: [boost] namespace boost?
From: Patrick Horgan (phorgan1_at_[hidden])
Date: 2011-01-15 17:44:53

On 01/15/2011 02:11 PM, Robert Ramey wrote:
> vicente.botet wrote:
>> ----- Original Message -----
>> From: "Denis Shevchenko"<for.dshevchenko_at_[hidden]>
>> To:<boost_at_[hidden]>
>> Sent: Saturday, January 15, 2011 9:56 PM
>> Subject: Re: [boost] namespace boost?
>>> 16.01.2011 00:49, vicente.botet ?????:
>>>> I find useful to have the file that include all the other files at
>>>> the boost directory level. As it is the case for Boost.Flyweight
>>>> #include<boost/flyweight.hpp>
>>> Hmm... But what if I want to update one header-only library? If I
>>> have 'common' file that include all the other files at the boost
>>> directory level, I must replace this file AND own directory. But if
>>> all files placed in own directory, I replacing only it.
>> You are right, and I forget often to replace this file, but usualy it
>> doesn't changes to much. The ideal will be that this file include a
>> all.hpp file included on the library directory. Other have proposed
>> someting like
>> #include<boost/flyweight/all.hpp>
> or #include<boost/flyweight/include.hpp> for the convenience header.
> actually, I might be ok with each library permitting ONE
> #include<boost/flyweight.hpp> // convenience header.
> I though I would prefer the former.
> My normal practice is not to use these anyway but rather pick out
> the specific one's I'm interested in. So it's not a huge issue for me.
> The reason I do this is that I like knowing that I'm including only
> the minimum required to get the job done.
Your compiler loves you for this, less work to do. I do the same,
because it is less work for the compiler, because I worry about side
effects from things I don't need, because I don't know without close
examination if any extra memory will be used by including something I
don't need, and because by including the minimum I need I can convince
myself that I have a deeper understanding.

All of this implies that I prefer people to break things into different
headers more intelligently, i.e. if something is used in multiple places
it should have a separate header so I don't get extra stuff I don't need
by including something I do need. That's one of my pet peeves.

Of course I have no objection to the existence of a parent include file
that includes everything for people that don't want to think about it
and to treat a particular part of a project as a black box. I do that
sometimes too. There's not enough time in the world to become an expert
on everything, (gad that's so frustrating, isn't it?!).


Boost list run by bdawes at, gregod at, cpdaniel at, john at