Using C++ templates to write generic functions

In this recipe, we will learn how to erase (or ignore) type information leveraging C++ templates. You will learn how C++ templates can be used to implement a C++ concept and how this type of erasure is used in the C++ Standard Library. This recipe is important as it will teach you how to better design your APIs as specifications that do not rely on specific types (or, in other words, how to write generic code). 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset