I enjoy that because I have my browser monospace font set to be one that also has those ligatures, your comment isn't enlightening at all (I set it up that way though, so it's not a problem for me :P )
The trailing return type pattern was added to the standard, IIRC, to make it easier for templated functions to have return types that depend on the types of the arguments, such as in this example:
template <typename A, typename B>
auto multiply(A a, B b) -> decltype(a * b) {
return a * b;
}
Its easier for the compiler to parse everything if `decltype(a * b) occurs _after_ the definition of `a` and `b`. Once this pattern was added and people started using it for that purpose, people also started using the pattern for all functions for consistency.
It's just a programming font ligature. If you copy and paste it you'll see the actual characters e.g.
(It's also modern C++ trailing return type.)
I enjoy that because I have my browser monospace font set to be one that also has those ligatures, your comment isn't enlightening at all (I set it up that way though, so it's not a problem for me :P )
Why would anybody think more words more better?
The trailing return type pattern was added to the standard, IIRC, to make it easier for templated functions to have return types that depend on the types of the arguments, such as in this example:
Its easier for the compiler to parse everything if `decltype(a * b) occurs _after_ the definition of `a` and `b`. Once this pattern was added and people started using it for that purpose, people also started using the pattern for all functions for consistency.
1 reply →
Some developers like ligature based fonts. They combine 2 characters into one glyph
Thank you and the others who were kind enough to explain this. I've avoided such fonts like the plague. Didn't know it did arrows like that.
Any keyboard can type “→” if you set up a compose key :)
It's just "->" - the ligature font just renders it as a unitary arrow