Check out example codes for "substitution failure is not an error". It will help you in understanding the concepts better.

Code Example 1

/* "Substitution Failure Is Not An Error"

This rule applies during overload resolution of function templates:
When substituting the explicitly specified or deduced type for the
template parameter fails, the specialization is discarded from the
overload set instead of causing a compile error.

This feature is used in template metaprogramming.
STL features like std::enable_if use SFINAE
*/

Learn ReactJs, React Native from akashmittal.com