O'Reilly logo

Extended STL, Volume 1: Collections and Iterators by Matthew Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required