In template metaprogramming, what does the compiler actually do when it encounters substitution failure during overload resolution, and why is this not a hard error?
template <class T>
auto f(T t) -> decltype(t.size(), void(), int{}) { return 1; }
template <class T>
int f(...) { return 2; }