Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2004-08-20 16:54:58

[Top-post since the new stuff gives a fuller context.]

I think I need to explain things. (This is what I get for not reading Boost
e-mail for a few days. I could have nipped this in the bud. I didn't find
out about this problem myself until I tried a compile....)

1. <boost/utility_fwd.hpp> was introduced with

1a. <boost/utility/base_from_member.hpp> #includes <boost/utility_fwd.hpp>,
and needs to since a template value default is in the forwarding header.

2. The other forward-able items in <boost/utility.hpp> were added to
<boost/utility_fwd.hpp> upon first commit.

3. The various items in <boost/utility.hpp> were split into several

4. The maintainers of <boost/noncopyable.hpp>, then _and_ now, ignored the
fact that <boost/utility_fwd.hpp> referenced boost::noncopyable. This was
the mistake.

5. What should have happened was to add "#include <boost/utility_fwd.hpp>"
to <boost/noncopyable.hpp> at the time of the split.

6. The reason for [5]? Headers that have a corresponding forwarding header
should always #include that forwarding header. Why? So...

7. If someone makes a significant change in the primary header, the
mismatch in the forwarding header will cause a compile-time error. (If only
we caught the mistake at [4], then Dave's change would have been flagged,
and we could have avoided this incident.)

8. Unfortunately, Dave and Aleksey didn't understand this and went the
other way. Instead of adding "#include <boost/utility_fwd.hpp>" to
<boost/noncopyable.hpp> (Bronek Kozicki suggested this), they excised
boost::noncopyable from <boost/utility_fwd.hpp>.

So, can we make the change go the other way?

On 8/20/04 2:18 PM, "David Abrahams" <dave_at_[hidden]> wrote:

> Matthias Troyer <troyer_at_[hidden]> writes:

>> Your latest changes to noncopyable (putting it into namespace
>> noncopyable_) seem to break a lot of boost code, since class
>> noncopyable now no longer exists in namespace boost.
> It should be better now. The original problem, as Aleksey suggested,
> was utility_fwd.hpp, which as a matter of fact I was *not* using. I
> just removed the noncopyable forward declaration and typedef from it
> and put it all in noncopyable.hpp.
> Sorry for the churn, everybody.

Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

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