Sign in to follow this  
digitalfreak

no std::max() and std::min() in algorithm ?

Recommended Posts

According to MSDN library docs, they exist. They're probably in another header somewhere that gets included by the algorithm header.

Although my version of MSDN has the following warning in it:

Quote:
To avoid conflicts with min and max in WINDEF.H, use _MIN and _MAX instead. These macros evaluate to _cpp_min and _cpp_max, respectively.

Share this post


Link to post
Share on other sites
Quote:
Original post by digitalfreak
the Stroustrup book says these two functions are declared in <algorithm>, but when I open that file under vc++ 2003's directory and search them, I found none. why doesn't microsoft comply with the c++ STL?

I can use ::std::min an ::std::max perfectly fine in .NET 2003

Share this post


Link to post
Share on other sites
Quote:
Original post by digitalfreak
the Stroustrup book says these two functions are declared in <algorithm>, but when I open that file under vc++ 2003's directory and search them, I found none. why doesn't microsoft comply with the c++ STL?


For compatibility with previous compilers, which pre-date the standard you speak of.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this