Kai Backman, 16-01-2007 11:55:
Your idea to at least make the headers self sufficient is excellent.
That would already kill a ton of problematic cases and is much faster
to test! Thanks! :-)
On 1/16/07, Mathias Bauer <[EMAIL PROTECTED]> wrote:
> The bigger question is why are such constructs used in the first
> place? Modifying a hxx file using a define is just plain bad
> programming in most cases.
Agreed. But it's pointless to ask these questions more than 10 years
It seems like I had a really bad communication day yesterday.. :-)
My question is, what modern C++ construct were these modifying headers
trying to simulate when they were originally written? And similarly,
what modern (good) construct could we replace them with today? So my
question is in the active, what can we do about it.
So far I've identified the following:
- Setting default values for a "namespace" (sw, sc), this is the
original example from ause
- Templatizing a header for different types. Sometimes including the
same header multiple times (or header including itself) to do this.
Are there other common types?
I've seen one to only define some stream operators only when compiling
with debug mode enabled.
But the header is loaded without the desired symbol defined, it expects
the operators to be defined, but they aren't, by the way (an example of
usage and it's a bug ;D).
Might to be others of this kind (which aren't breaking anything).
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]