Custom Templatized Data Structures

It’s possible to build your own custom templatized data structures, including linked lists, queues, stacks and trees. Typically these are implemented with objects that are linked together via pointers. Such code is complex and error-prone—the slightest omissions or oversights can lead to serious memory-access violations and memory-leak errors with no forewarning from the compiler. If many programmers on a large project implement custom containers and algorithms for different tasks, the code becomes difficult to modify, maintain and debug.

Image Software Engineering Observation 15.1

Avoid reinventing the wheel; program ...

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.