This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Tue, Mar 08, 2005 at 02:06:48PM +0100, Giovanni Bajo wrote: > Mark Mitchell <mark@codesourcery.com> wrote: > > > IMO, if these are C++-only, it's relatively easy to deprecate these > > extension -- but I'd like to hear from Jason and Nathan, and also the > > user community before we do that. Of all the extensions we've had, this > > one really hasn't been that problematic. > > I would prefer them to stay. My reasons: > > 1) std::min() and std::max() are not exact replacements. For instance, you > cannot do std::min(3, 4.0f) because the arguments are of different type. > Also, you cannot use reference to non-const types as arguments. The min/max > exensions do not suffer from these problems (I consider the former very > problematic, and the latter just annoying). I was about to reply making the same point about template argument deduction. Whether or not the extensions get deprecated, shouldn't the docs for them at least mention std::min and std::max, rather than only referring to the infamous, flawed macros? * gcc/doc/extend.texi: Mention std::min and std::max in docs for min/max operators. Patch OK for mainline? jon -- "In theory, practice and theory are the same, but in practice they are different." - Larry McVoy
Attachment:
gcc-doc_minmax.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |