2 ms·
I actually prefer trailing return type for the simple reason that they often get very verbose with templates, and then it can be difficult to find the function
by int_19h 4y ago
I actually prefer trailing return type for the simple reason that they often get very verbose with templates, and then it can be difficult to find the function name in the declaration. With the -> syntax, the function name is always in the same spot visually.
As for -> being painful to write - that's obviously subjective, but more importantly, given that it's the operator you use to access members via pointer-like things (including smart pointers and iterators), it's already pervasive in C++.