Skip to content

Latest commit

 

History

History
53 lines (45 loc) · 2.62 KB

CppIterator.md

File metadata and controls

53 lines (45 loc) · 2.62 KB

Iterators allow a uniform way to travel through all STL containers.

  1. Herb Sutter. Exceptional C++ style. 2005. ISBN: 0-201-76042-8. Item 1 guideline: 'Prefer reusing algorithms, particularly standard algorithms (e.g., for_each), instead of crafting your own loops'.
  2. Herb Sutter. Exceptional C++ style. 2005. ISBN: 0-201-76042-8. Item 1 guideline: 'Use const_iterator when you are not modifying the contents of a container'.
  3. Herb Sutter. Exceptional C++ style. 2005. ISBN: 0-201-76042-8. Item 1 guideline: 'Prefer comparing iterators with !=, not <'.
  4. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 31.6. Advice. page 924: '[16] Use const iterators where you don't need to modify the elements of a container'
  5. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 31.6. Advice. page 924: '[17] Use auto to avoid verbosity and typos when you use iterators'
  6. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 31.6. Advice. page 924: '[21] Don't use iterators into a resized vector or deque'
  7. Gottschling, Peter. Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers. Addison-Wesley Professional, 2015. Chapter 4.1.5: 'If you write iterator-based functions, provide a user-friendly interface on top of them'