|
Boost : |
Subject: Re: [boost] numeric_cast
From: Kim Barrett (kab.conundrums_at_[hidden])
Date: 2011-06-27 18:01:21
On Jun 27, 2011, at 5:03 PM, Lars Viklund wrote:
> On Mon, Jun 27, 2011 at 04:42:43PM -0400, Edward Diener wrote:
>> I doubt if any compiler cares where the #ifndef ( or #if !defined ) is.
>
> I would reckon that compilers and preprocessor implementations may have
> fast-paths that they go into if they detect something that looks like an
> include guard very early in the file, where they can cheaply reject it
> if already included with a minimum of work, if they guarantee
> correctness.
>
> After, all, it's a very common operation, it's most probably very
> beneficial for cutting preprocessing costs.
http://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk