|
Boost : |
Subject: Re: [boost] Proposal for #pragma once support
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2009-06-09 23:33:46
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
That way anyone who wants it can have it, and it's obvious by looking
at the headers how to get it, but we're not encouraging its use.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk