Boost logo

Boost :

From: Saul Tamari (saul_tamari_at_[hidden])
Date: 2000-07-05 05:17:56


> ----------
> From: Mark Rodgers
>
> I have some code that uses std::min and std::max. Of course it doesn't
> work with MSVC. The work around I have used is
>
> #if defined(BOOST_MSVC) && _MSC_VER <= 1200 && !defined(NOMINMAX)
> # undef min
> # undef max
> # define NOMINMAX
> namespace std
> {
> template<class T> inline const T &max(const T &x, const T &y)
> { return x < y ? y : x; }
> template<class T> inline const T &min(const T &x, const T &y)
> { return y < x ? y : x; }
> }
> #endif
>
        ....

Maybe you should try and buy a more conforming standard library from
dinkumware (for VC++). It implements the min/max functions.

bye
Saul


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk