Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-12-28 13:55:54


--- Alberto Barbati <abarbati_at_[hidden]> wrote:

> or even better:
>
> #if _MSC_VER+0 >= 1020
> #pragma once
> #endif
>
> But not only MS compilers have the pragma once, which is in my opinion
> very useful.

IMHO a pragma once, or similar directive, is only useful in that it doesn't
force you to "invent" a unique name for the included source file (because it
specifies no name at all). The fact that it is useful to reduce compilation
time is just a result of some compiler writers' attitude to prefer encouraging
the use of non-standard features rather than e.g. recognizing the include guard
idiom and optimize away the subsequent #includes (as for instance g++ does).

Genny.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


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