SFINAE, enable_if, and Concepts
C++ has an important feature called “Substitution Failure Is Not An Error”. Meaning, if implicit template argument substitution leads to an error, the expression is simply ignored and the error never becomes visible to the user. With this it is then possible to have very fine-grained control over overload resolution.
It is expected that C++17 will have a much nicer syntax for this task, called concepts. The feature is already available for GCC and will possibly become available as experimental option in most C++ compilers soon.
Updated by Kretz, Matthias over 8 years ago
- Blocked by Talk #794: Templates and Meta-Programming added