Pros and Cons of Alternative Function Syntax in C++--Petr Zemek

Do you know the trailing return type?

Pros and Cons of Alternative Function Syntax in C++

by Petr Zemek

From the article:

C++11 introduced an alternative syntax for writing function declarations. Instead of putting the return type before the name of the function (e.g. int func()), the new syntax allows us to write it after the parameters (e.g. auto func() -> int). This leads to a couple of questions: Why was such an alternative syntax added? Is it meant to be a replacement for the original syntax? To help you with these questions, the present blog post tries to summarize the advantages and disadvantages of this newly added syntax...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.