This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: [Patch] libstdc++/29989


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]