samedi 23 juillet 2016

Is the new C++ return syntax limited?

I started a new private project and decided to use more c++11/14 this time. So I also started using the new return syntax

auto functionName() -> returnType;

It works for the most parts very well but now I needed some error handling and could not find out how to re-write stuff like this:

virtual const char* what() const noexcept override;

with the new syntax. Are their some cases where the new syntax can not be used or Am I only not clever enough to find the right order? For me it is importend to keep things consistent so I hope the problem is more on my side.

Aucun commentaire:

Enregistrer un commentaire