Chapter 37. Intermezzo: Discretion Being the Better Part of Nomenclature . . .

 

You can tell a Yorkshireman, but you can’t tell him much.

 
 --(Uncle) Michael Gibbs

I originally wanted to give the transform_iterator creator function the name transform(), which the standard library already uses for its transforming algorithm overloads. Having these two different facilities share the same name should work because they’re in separate namespaces. Further, even when both are brought into the same namespace via a using-declaration, there’s no clash because the standard algorithm overloads have four and five parameters, and the transform_iterator creator function has only two.

#include <stlsoft/iterators/transform_iterator.hpp> #include <algorithm> using ...

Get Extended STL, Volume 1: Collections and Iterators 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.