Boost logo

Boost :

Subject: Re: [boost] Proposal for #pragma once support
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-06-11 10:46:33


Stephen Nuchia wrote
On Wednesday, June 10, 2009 10:46 AM
>
> #pragma once is useful in Windows for the same reason they have the
> pre-compiled header abomination: slow directory-level file system
> operations and a really bad system header legacy.
>
> On the point that some headers should not use this mechanism:
> in addition to headers designed to instantiate something in-
> place, some headers include optional components activated by a
> user-specified define. The idempotent and flag-independent
> portions can be enclosed in a preprocessor include guard but
> the optional part should be left outside the guard.

[snip examples of optional code outside guard]

[snip examples of Microsoft magic speedup mechanisms]

These all just reinforce the idea that an automated solution is only a first pass. Building and testing must occur to find the headers that should not use #pragma once before the changes are committed, assuming this effort comes to fruition. Since making the changes, building successfully, and testing successfully, must occur in order to provide meaningful test results, special cases like those you've noted will have been addressed.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


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