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 36. Transform Iterator

 

The most common of all follies is to believe passionately in the palpably not true. It is the chief occupation of mankind.

 
 --Henry Louis Mencken
 

I reject your reality, and substitute my own!

 
 --Adam Savage

Introduction

This chapter, the first on the subject of iterator adaptors, describes a simple iterator adaptor that allows the apparent values and/or types of the elements in a range to be modified, via the iterator adaptor class template stlsoft::transform_iterator. It illustrates several of the issues associated with writing iterator adaptors, including determination of the adapted iterator category, support for different iterator category refinements, and the restrictions on selection of the supported reference ...

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