What is an auto variable?
Auto variable is when a placeholder type appears as an expr. It is when auto X equal expr. The type is derived from the initialiser when the placeholder type is constraint.
Why is it convenient to use?
It simplifies when the placeholder type specifier is auto or type-constraint auto (since C++20), the variable type is deduced from the initializer using the rules for template argument deduction from a function call.
When should you use it?
Enable it possible to use template operators to use, since there is no syntax to specify template arguments for an operator other than by re-writing it as a function call expression:
When will the type of an auto variable be determined (compile-time or run-time?)
Template argument deduction attempts to determine template arguments, which can be substituted into each parameter P to produce the type deduced A, which is the same as the type of the argument A, after adjustments listed below. If there are multiple parameters, each P/A pair is deduced separately and the deduced template arguments are then combined.