From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-06-14 09:03:21
At 01:16 AM 6/14/2001, Darin Adler 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
>> two functions in question are declared in a header (test_tools.hpp) so
>> 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.
test_main.cpp is sort of an odd bird. It is unusual for a file sometimes
to be treated as a header, and other times as an implementation file. Thus
I'm still feeling my way as to what the best practice is for these
>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.
Interesting. I don't remember ever hearing any suggested practice for
ordering of #includes. Do you have a simple example of an error your
suggestion would detect? I think I understand your rationale, but an
example might help.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk