10.5.3. Algorithm Naming Conventions
Separate from the parameter conventions, the algorithms also conform to a set of naming and overload conventions. These conventions deal with how we supply an operation to use in place of the default <
or ==
operator and with whether the algorithm writes to its input sequence or to a separate destination.
Some Algorithms Use Overloading to Pass a Predicate
Algorithms that take a predicate to use in place of the <
or ==
operator, and that do not take other arguments, typically are overloaded. One version of the function uses the element type’s operator to compare elements; the second takes an extra parameter ...
Get C++ Primer, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.