Boost logo

Boost :

Subject: Re: [boost] [#pragma once]
From: Eugene Wee (crystalrecursion_at_[hidden])
Date: 2009-04-10 11:48:10


Hi,

On Fri, Apr 10, 2009 at 11:23 PM, Marcus Lindblom <macke_at_[hidden]> wrote:
> I've seen benchmarks that say some compilers (gcc, msvc) are smart enough to
> recognize #ifndef/#endif and do the #pragma once equivalent. (i.e. there's
> no discernable performance difference.)

Sutter and Alexandrescu say the same in C++ Coding Standards Item #24,
but with admonishment to keep all other code and comments in between
to cater for less intelligent detection of include guards (whereas
many header files in Boost have comments right at the top).

Regards,
Eugene Wee


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