Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-07-05 16:42:02


At 11:02 AM 7/5/2001, David Abrahams wrote:
>
>----- Original Message -----
>From: "Beman Dawes" <bdawes_at_[hidden]>
>
>> Anyhow, we should probably globally change to #include "..."
>
>Perhaps so.
>
>> That is the correct form for all non-standard library includes, and
Boost
>> should be using it.
>
>Where do you get your definition of "correct" in this case?
>I am just wondering, because the issue is far from clear to me. Peter
Dimov
>and Toon Knapen made some good arguments for <>.

Using #include<...> relies on unspecified behavior. 16.2 paragraph 2
(which supplies semantics for #include <...>) applies only to a "header",
which in 1.4 paragraph 5 is defined as a standard library header. It
doesn't apply to user included source files.

Thus using #include <...> isn't guaranteed to find user files.

It took me years to understand this is what folks are talking about when
they say that <...> should be reserved for standard library headers. I was
so used to thinking that the term "header" applied to both system and user
files, that I completely failed to understand the arguments of those who
said it didn't.

(Actually, I think the standard is unclear. Take a look at 16.2 paragraph 2
and tell me if you think "header" applies to both std lib and user
includes. I'll file a defect report if others agree that 16.2 para 2 is
unclear.)

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk