Boost logo

Boost Users :

From: Edward Diener (eddielee_at_[hidden])
Date: 2005-07-23 09:34:41


David Abrahams wrote:
> Edward Diener <eddielee_at_[hidden]> writes:
>
>
>>David Abrahams wrote:
>>
>>>Edward Diener <eddielee_at_[hidden]> writes:
>>>
>>>
>>>
>>>>>All I can say it that this has worked from me as well as the testers in our
>>>>>matrix.
>>>>
>>>>I have discovered the reason for the problem. It has to do with the form of
>>>>#include in the Spirit 1.6x headers. The headers erroneously use, in some
>>>>places, the form:
>>>>
>>>>#include "boost/..."
>>>>
>>>>rather than
>>>>
>>>>#include <boost/...>
>>>
>>>
>>>It's not "erroneously" exactly. Whether to include with quotes or
>>>angles has been a source of contention among Boost developers and
>>>there has been no agreement. I am in the latter camp, myself, but
>>>others seem to thing that the former is the only correct way.
>>
>>One I changed the include for the Spirit 1.6.2 headers to use angles
>>instead of quotes, the build worked correctly as expected.
>>
>>In the case of Boost, the only reason to use the former would be if one were
>>specifically compiling from the Boost root directory and did not include the
>>root directory in the compiler's path.
>
>
> No, there are other reasons that people argue quotes are right.
> Please search the archives if you want the details.

Granted there are other reasons, the main fact is that the use of an older
version of Spirit ( or any other Boost library ) in a separate directory
structure, along with Boost versions in the main Boost directory structure, will
not work when quotes are used instead of brackets with Borland's compilers.

I also believe that most compilers follow the Borland example of having quotes
mean that the when header file search is done the current directory is searched
first followed by the include directories, while having angles means that only
the include directories are searched. This would mean that the situation given
in the previous paragraph will not work for most other compilers also.

Given the above I think that angles should always be used instead of quotes when
including Boost header files within the Boost directory tree.

>
> All this stuff about where the compiler searches is almost entirely
> implementation-dependent. There is no standard, not even a de-facto
> one, for how quotes and angles will behave.

I do know that. Nonetheless most compilers appear to follow the order given above.

Mr. Guzman has agreed to make the changes in the Spirit 1.6.2 header files.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net