Boost logo

Boost :

Subject: Re: [boost] Proposal for #pragma once support
From: Sohail Somani (sohail_at_[hidden])
Date: 2009-06-09 14:24:43


Zachary Turner wrote:
> It seems someone else in the thread has already run benchmarks on GCC, but
> regardless of how the benchmarks did or did not turn out, I can say with
> 100% certainty that nobody will suffer. That's the exact reason I mentioned
> that compilers should be whitelisted based on which ones benefit from
> #pragma once, and only use #pragma once for said compilers.
>
> #if defined(_MSC_VER) && (_MSC_VER >= 1020)
> #pragma once
> #endif
>
> That's all it takes. Everybody benefits. Of course I don't have licenses
> for every C++ compiler around, but I'm sure there are other compilres in
> which it benefits also. So I would need some assistance from other people
> who do have other compilers to help find out which compilers it does offer
> an improvement on.

I think one sure-fire way to get most people to at least try it would be
to write a script that adds this to each header in their boost installation.

I'd be willing to try it (make sure it runs on Linux!)

-- 
Sohail Somani
http://uint32t.blogspot.com

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