Template talk:par cmp

Not a function
I believe this should be saying function object rather than function:

Per 25.4[alg.sorting]/2.
 * Compare is a function object type

Per 20.8[function.objects]/1
 * A function object type is an object type that can be the type of the postfix-expression in a function call

Per 3.9[basic.types]/8
 * An object type is a (possibly cv-qualified) type that is not a function type, [...]

and of course, back in 20.8/1,
 * A function object is an object of a function object type

(cmp in all What-links-here is an object of type Compare)

And perhaps this could link to. --Cubbi (talk) 20:29, 23 January 2014 (PST)


 * Done. --P12 07:21, 25 January 2014 (PST)
 * just in time, too (although as that discussino shows, it may be helpful to write "before" instead of "less") --Cubbi (talk) 12:45, 3 February 2014 (PST)


 * Wouldn't a separate template be a better solution? I see quite a lot of pages that use this template to describe functionality not related to ordering. --P12 01:15, 4 February 2014 (PST)


 * Now I'm confused, as all of those pages look like they talk about ordering of things. Is there one in particular that you were thinking of? Off the top of my head, using wording like "returns true if the first argument should be ordered before the second" seems like it works okay. --Nate (talk) 07:06, 4 February 2014 (PST)


 * max, min and related don't talk about ordering. The rest, indeed, should have the proposed wording. --P12 11:56, 4 February 2014 (PST)


 * I wouldn't be too upset if e.g. min said "returns true if a should appear before b" instead of "returns true if a is less than b" -- they both seem pretty clear. But having a separate template would be fine as well. :) --Nate (talk) 11:38, 5 February 2014 (PST)