Boost logo

Boost :

Subject: Re: [boost] [#pragma once]
From: John Maddock (john_at_[hidden])
Date: 2009-04-10 11:45:36

> 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.)

Nod. Can't comment on msvc but gcc supports the #ifndef...#endif idiom and
doesn't reopen the file at all if it's already seen it.

That said it wouldn't hurt to extend this to other compilers if we can sort
out a definitive list.


Boost list run by bdawes at, gregod at, cpdaniel at, john at