logoalt Hacker News

OneDeuxTriSeiGoyesterday at 6:29 AM1 replyview on HN

I'd suppose this really depends on how you are developing your codebase but most code should probably be using a trailing return type or using an auto (or template) return type with a concept/requires constraint on the return type.

For any seriously templated or metaprogrammed code nowadays a concept/requires is going to make it a lot more obvious what your code is actually doing and give you actually useful errors in the event someone is misusing your code.


Replies

jjmarryesterday at 6:30 AM

I don't understand why anyone would use auto and a trailing return type for their functions. The syntax is annoying and breaks too much precedent.

show 4 replies