C++ Language/Type/Shortcuts/FromReturnStatement

A compiler can infer a function's return type from its  statement, by specifying the return type as either   or.

Additional information about inferring type from a return statement