Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2001-06-14 09:00:22

on 6/13/01 10:16 PM, Darin Adler at darin_at_[hidden] wrote:

> On Wednesday, June 13, 2001, at 06:55 PM, Beman Dawes wrote:
>> That's what I thought. But what is confusing about the request is that the
>> two functions in question are declared in a header (test_tools.hpp) so they
>> shouldn't be hidden.
> Then the appropriate fix would be to include the test_tools.hpp header in
> test_tools.cpp. That's what's causing the problem here, I think.
> In my own programs, as a matter of style I include the corresponding
> header first, before any standard headers. This helps make sure you don't
> forget to include it, and also provides a rudimentary "does this header
> include enough things to stand alone" check. I'd like to suggest it was a
> standard practice for Boost as well.

Be careful, test_tools.cpp is #included by test_tools.hpp when
BOOST_INCLUDE_MAIN is #defined. So your #include should only be done if the
macro is _not_ #defined.

I brought up this problem already on April 14, 15, and 27 about Prototypes
Needed. All we had to do was to move the #includes from before the
prototype declarations to after the declarations.

Combining the ideas should be the fix.

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

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