17

Creating STL -Compatible Algorithms

This chapter discusses creating versatile and efficient algorithms in C++. Developers will learn type-generic programming, understand the function overloading, and learn to tailor existing algorithms to specific needs. The chapter will include theory, best practices, and hands-on techniques. By the end, we will be equipped to develop powerful and adaptable algorithms for various scenarios.

In this chapter, we will cover the following main topics:

  • Template functions
  • Overloading
  • Creating generic algorithms
  • Customizing existing algorithms

Technical requirements

The code in this chapter can be found on GitHub:

https://github.com/PacktPublishing/Data-Structures-and-Algorithms-with-the-CPP-STL

Template functions ...

Get Data Structures and Algorithms with the C++ STL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.