[2][3][4] An ordinary return type is specified before the function's name.
In this example of traditional C++ code, the return type of HasMultipleItems() is bool: A trailing return type is specified after the parameter list, following -> symbols: In modern C++, the meaning of the auto keyword will depend on its context: Consider the task of programming a generic version of int Add(const int& lhs, const int& rhs) { return lhs + rhs; }.
A proper expression of this function's return type would use the two formal parameter names with decltype: decltype(lhs + rhs).
But, where a return type is traditionally specified, those two formal parameters are not yet in scope.
Consequently, this code will not compile: The formal parameters are in scope, where a trailing return type is specified: