7

SFINAE, Concepts, and Overload Resolution Management

The idiom we study in this chapter, Substitution Failure Is Not An Error (SFINAE), is one of the more complex in terms of the language features it uses. Thus, it tends to get inordinate amounts of attention from C++ programmers. There is something in this feature that appeals to the mindset of a typical C++ programmer - a normal person thinks that, if it isn’t broken, don’t mess with it. A programmer, especially one writing in C++, tends to think that, if it isn’t broken, you’re not using it to its full potential. Let’s just say that SFINAE has a lot of potential.

We will cover the following topics in this chapter:

  • What are function overloading and overload resolution? What are type deduction ...

Get Hands-On Design Patterns with C++ - Second Edition 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.