Topic: Defect Report: std::min and std::max not inheriting std::binary_function


Author: "Mark D. Rintoul" <rintoul@sandia.gov>
Date: 1999/08/26
Raw View
 [Moderator's note: this defect report has been forwarded to the
 C++ committee.  -moderator (fjh).]

In Section 25.3.7 [lib.alg.min.max], both std::min and
std::max are defined as template functions.  This is very
different than the definition of std::plus (and similar
structs) which are defined as function objects which inherit
std::binary_function.

 This lack of inheritance leaves std::min and std::max
somewhat useless in standard library algorithms which require
a function object that inherits std::binary_function.

 Mark Rintoul
 rintoul@sandia.gov
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]