the only real difference between auto and template type deduction is that auto assumes that a braced initializer represents a std::initializer_list, but template type deduction doesn’t.
當牽涉到 std::initializer_list 時:
The compiler sees it ({1, 2, 3}) as std::initializer_list<T>, and then try to deduce T, in this case, a int:
However, the following case failed, because the compiler fails to deduce type T:
另外一個要注意的點是:
auto in a function return type or a lambda parameter implies template type deduction, not auto type deduction.