Boost logo

Boost :

Subject: Re: [boost] [function] function.hpp lacks include guard
From: Andrey Tcherepanov (moyt63c02_at_[hidden])
Date: 2008-10-22 14:50:30


Since this variable is not gets redefined very often in the user projects,
may be it is possible to introduce include guard that depends on this
variable as well?

#ifdef BOOST_FUNCTION_HPP_##BOOST_FUNCTION_MAX_ARGS
#define BOOST_FUNCTION_HPP_##BOOST_FUNCTION_MAX_ARGS
...
#endif

I remember I got quite a speedup on windows compilation when I put
"simple" #ifdef BOOST_FUNCTION_HPP guard into the file.

Regards,
    Andrey

On Tue, 21 Oct 2008 16:09:18 -0600, Doug Gregor <doug.gregor_at_[hidden]>
wrote:

> On Tue, Oct 21, 2008 at 9:41 AM, Peter Bartlett <pete_at_[hidden]>
> wrote:
>> I haven't tested it, but looking at the code I think you can include
>> boost/function.hpp multiple times and if BOOST_FUNCTION_MAX_ARGS is
>> (re-)defined between any of those inclusions then everything still
>> works as
>> you'd hope.
>
> Yep, that's why it doesn't have include guards.
>
> - Doug


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