Template type deduction and auto type deduction work similarly by deducing the type of variables based on the initializers or function arguments. There are three cases for template type deduction depending on whether the parameter type is a reference/pointer, universal reference, or neither. Auto type deduction follows the same rules except when initializing with {} which deduces to std::initializer_list instead of the contained type. Template type deduction is needed for auto on return types or lambda parameters in C++14.