Boost logo

Boost :

From: Paul Giaccone (paulg_at_[hidden])
Date: 2006-04-03 04:54:14


Gennadiy Rozental wrote:

>>>Should I write (for example):
>>>
>>>#include <iostream>
>>>#include <boost/test/unit_test.hpp>
>>>
>>>or
>>>
>>>#include <boost/test/unit_test.hpp>
>>>#include <iostream>
>>>
>>>Or does it not matter?
>>>
It might matter, because there could be macros in standard libraries
that conflict with those in the Boost libraries, although I'm sure Boost
developers take pains to avoid this doing this.

I always go by the principle that older definitions should take
precedence over newer ones and so put standard libraries before Boost
libraries (the opposite of what has been advised by David Abrahams) and
then include own header files after that. As Boost developers are nod
oubt careful not to redefine anything in standard libraries, I suppose
the order doesn't make any difference. Those more familiar with the way
compilers work might be able to say whether or not this is the case.

Paul


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