Boost logo

Boost :

Subject: Re: [boost] Proposal for #pragma once support
From: Zachary Turner (divisortheory_at_[hidden])
Date: 2009-06-09 16:05:53


On Tue, Jun 9, 2009 at 2:57 PM, John Phillips
<phillips_at_[hidden]>wrote:

> Zachary Turner wrote:
>
> I agree that it would need to be automated. But the script itself should
>> be
>> very trivial, I'd be willing to try it myself. And perhaps the best
>> approach is what I mentioned in a previous post, to force the programmer
>> to
>> explicitly define BOOST_USE_PRAGMA_ONCE before including a boost header
>> file. This would solve the problem of having to modify every header when
>> new compilers were released. And since by default it would be undefined,
>> an
>> out-of-the-box boost installation would work exactly as it does now. I'll
>> work on this a bit later today perhaps, and try to post some benchmarks
>> for
>> for compiling boost itself, and for compiling a commercial product which
>> uses boost.
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost
>>
>>
> I have a dim memory that there used to be some libraries that did not have
> include guards, and would fail without them because of recursive use of
> headers. Is that still true, or am I hallucinating about it?
>
> This would complicate the script somewhat.
>

Err, did have include guards and would fail without, or did not have include
guards and would fail with? If they have include guards and will fail
without (which seems to be the 99.9% case) then pragma once shouldn't affect
that. If they do not have include guards and must not have include guards,
then yes this will complicate the script somewhat, but I'll try to figure it
out anyway. Might take a day or two until I get a script working so I
generate some benchmarks, but I'll post back once I do.


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