[Patch] libstdc++/29989
Chris Jefferson
chris@bubblescope.net
Mon Dec 4 19:01:00 GMT 2006
On 04/12/06, Paolo Carlini <pcarlini@suse.de> wrote:
> Doug Gregor wrote:
>
> > <windows.h> is known to #define min and max as macros.
>
> Interesting, thanks. Then, what do you suggest? Should we undef min and
> max elsewhere too? The PR was about <limits>, which, at some point in
> the far past also had undefs, not anymore...
>
Personally I'd like to see them removed, as they are just patching
over bugs in other libraries, and are likely to be effected by things
like order of header inclusion. I've previously had to deal with a
library that #defined infinity. Should there be a special exception
for that as well?
If the #defs are removed, I thought it might be wise for at least one
version to perhaps replace them with something like this, as the error
message you get from something being defined as a little difficult to
understand...
#ifdef min
#error min should not be defined as a macro
#endif
Could also try putting something like this in svn head now and see how
many people complain about it? :)
Chris
More information about the Libstdc++
mailing list