top | item 44622513

(no title)

haileys | 7 months ago

Well, `override` going after the return type is certainly confusing.

I was recently tripped up by putting `const` at the end, where `override` is supposed to go. It compiled and worked even. It wasn't until later on when something else suddenly failed to compile that I realised that `const` in that position was a modifier on the return type, not the method.

So `const` goes before the -> but `override` goes after the return type. Got it.

discuss

order

No comments yet.