A more general fix that is working for us is to include <boost/config.hpp> in the precompiled header file.  config.hpp looks after disabling Windows' min and max functions.

Chris

----------
From:   Deane_Yang@yahoo.com
Reply To:       boost@yahoogroups.com
Sent:   Monday, August 27, 2001 12:57 AM
To:     boost@yahoogroups.com
Subject:        [boost] Re: max/min problems

Yes, that seems to work. Thank you!

--- In boost@y..., Darin Adler <darin@b...> wrote:
> On Sunday, August 26, 2001, at 09:26  PM, Deane_Yang@y... wrote:
>
> > I'm trying to compile some code that does the following:
> >
> > #include <ole2.h> // Windows stuff
> > #include <boost/cast.hpp>
> >
> > This doesn't work, because the first #include defines
> > macros max and min. This conflicts with the use of min
> > inside cast.hpp.
> >
> > Is this something that I always have to fix manually?
>
> The typical solution to this Windows issue is to #define NOMINMAX
before
> including any Windows headers.
>
>      -- Darin


Info: http://www.boost.org  Unsubscribe: <mailto:boost-unsubscribe@yahoogroups.com>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/