This is an archive of the discontinued LLVM Phabricator instance.

[ADT] Rewrite mapped_iterator in terms of iterator_adaptor_base.
ClosedPublic

Authored by lhames on Nov 9 2017, 11:25 AM.

Details

Summary

This eliminates the boilerplate implementation of the iterator interface in
mapped_iterator.

This patch also adds unit tests that verify that the mapped function is applied
by operator* and operator->, and that references returned by the map function
are returned via operator*.

Diff Detail

Repository
rL LLVM

Event Timeline

lhames created this revision.Nov 9 2017, 11:25 AM
dblaikie accepted this revision.Nov 9 2017, 11:38 AM

Looks good to me - thanks!

This revision is now accepted and ready to land.Nov 9 2017, 11:38 AM
This revision was automatically updated to reflect the committed changes.