ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] Solution to Windows' min/max problem?
by Daryle Walker other posts by this author
Feb 29 2004 11:16PM messages near this date
[boost] [Boost-bugs] [ boost-Bugs-907276 ] ha ha very funy........idiots! | [boost] Re: Solution to Windows' min/max problem?
I learned some new stuff from another post about the min/max macros given in
the Windows headers.  Can the following suppositions and solution work?

1.  The MS Windows headers define "min" and "max" macros
2.  But nothing in those headers _actually needs_ those macros
3.  These macros prevent STL from working
4.  A "NOMINMAX" #define can be created to turn off the macros
5.  Using the #define will fix STL _without_ breaking the MS stuff
6.  The #define would break user code that uses the macros, though
7.  If an user with that breakage includes STL, they have an alternate "min"
and "max" available!
8.  Boost pretty much requires STL

So why can't we add:

#if defined(min) || defined(max)
#error Define NOMINMAX and use the alternates in <algorithm> 
#endif

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Daryle Walker
David Abrahams
Eric Niebler

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved