Advantage of using trailing return type in C++11 functions [duplicate]

In this example, they mean the exact same thing. However, there are a few advantages to using the trailing return type form consistently (Phil Nash calls these “East End Functions”, since the return type is on the east end). Using parameters. Obviously when using parameters to determine the return type, you must use a trailing … Read more

Should the trailing return type syntax style become the default for new C++11 programs? [closed]

There are certain cases where you must use a trailing return type. Most notably, a lambda return type, if specified, must be specified via a trailing return type. Also, if your return type utilizes a decltype that requires that the argument names are in scope, a trailing return type must be used (however, one can … Read more