Quiet Failure

What does SFINAE stand for, and what does it enable?

template<typename T>
auto serialize(T val) -> decltype(val.toString(), std::string())
{ return val.toString(); }

template<typename T>
std::string serialize(T val)
{ return std::to_string(val); }
A

Standard Format for Implementing Named Abstract Expressions: it's a design pattern for expression templates

B

Substitution Failure Is Not An Error: if substituting a template argument causes an invalid expression in the function signature, that overload is silently removed from the candidate set instead of causing a compile error

C

Static Function Inference Not Allowed in Expressions: it prevents calling static functions inside template declarations

D

Substitution Failure Is Not An Error: it catches runtime errors from invalid template arguments and converts them to exceptions