PROJECT DOSSIER // [C++ POOL — DAY 17]VIEW SOURCEBACK TO PROJECTS →

01 // PROJECT AT A GLANCE

C++ POOL — DAY 17

C++

Last day of the pool: writing algorithms that work on any collection.

The pool's destination: writing a search, a sort or a count once, and being able to apply it indifferently to an array, a list or any other way of storing data. The trick is never to talk about the container, only about a means of walking through it step by step. It is the principle behind the power of the library shipped with C++, rebuilt yourself to understand how it holds together.

Template wrappers over the standard library algorithms: do_find, then some fifteen generic functions delegating to std::find, count, equal, fill, replace, remove, rotate, for_each, reverse, sort, unique and merge.

PRIMARYC++
DELIVERYTEAM RECORD
VERIFICATIONgcc/g++
SOURCEINSPECTOR READY
MEDIA ATTACHMENTS (Images, Photos, Videos)

03 // KEY OUTCOMES

  • Using the standard library rather than rewriting it, an explicit constraint of the subject
  • The same generic code works on any container, through begin() and end()
  • The culmination of the genericity progression: from void* to templates

04 // SOURCE TREE

READING SOURCE…