Boost logo

Boost :

Subject: Re: [boost] Mixed use of "include" directives with quoted vs. angle-bracketed params, causing havoc
From: Michael Fawcett (michael.fawcett_at_[hidden])
Date: 2008-09-07 20:58:25


On Sun, Sep 7, 2008 at 12:37 PM, Victor V. Terber <victor_at_[hidden]> wrote:
> Michael Fawcett wrote:
>> Now, isn't there a slight performance and semantic difference?
> Semantic difference: With quotes you search an implementation defined path
> first, only then search the (also implementation-defined) paths you would
> have searched with angled bracket.
>
>> performance
> Not generally predictable, as it depends where the files are actually
> placed. But the maximum number of places to look at is guaranteed to be
> equal or less with angled brackets than with quotes.

I think that means for libraries it makes more sense to use angle
brackets. Boost headers don't rely on any such thing as a "current
directory", they require the boost path in the include search path,
therefore, the semantics (and maybe performance?) favor angle
brackets.

>> Doesn't <> mean search compiler dependent search path for file, then
>> search user supplied paths in order supplied, and "" means search
>> user supplied path in order supplied, then fall back to compiler
>> dependent path?
> No, that is not guaranteed. It's wholly implementation-defined (according to
> the standard, paragraph 16.2.3). That may (or may not) involve e.g. concepts
> like "current directory", "any directories in the call graph" etc. As it
> says: "implementation-defined".

Thanks for the reference, I didn't have a copy handy at home (only at work).

--Michael Fawcett


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