|
Boost : |
Subject: Re: [boost] Proposal for #pragma once support
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-06-10 14:19:29
On Tue, Jun 9, 2009 at 8:33 PM, Scott McMurray<me22.ca+boost_at_[hidden]> wrote:
> 2009/6/9 Emil Dotchevski <emildotchevski_at_[hidden]>:
>>
>> You're making the same point I was thinking about earlier, which is
>> that in theory #pragma once shouldn't be faster than include guards.
>> So how about this:
>>
>> #include <boost/detail/workaround.hpp>
>> #if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1500)
>> #pragma once
>> #endif
>>
>
> Other than the fact that this should just be solved for once and for
> all in MSVC, rather than forcing us to pollute our code, I don't see a
> problem with just using this:
>
> #ifdef BOOST_ENABLE_PRAGMA_ONCE
> #pragma once
> #endif
I'm not sure you got my drift, using BOOST_WORKAROUND effectively
flags the better #pragma once performance on MSVC as a bug. :)
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk