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

Started by
2 comments, last by Shannon Barber 19 years, 6 months ago
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?
Advertisement
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.
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
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.

- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement