Open hatcat opened 2 years ago
I may be the 17th person to report this ... but there's a very tiny nit on p280 of the published book.
"If we rewrite this function while observing ES.5: "Keep scopes small," we might arrive at this:
int f2(int a, int b, float c) { if (a > b) return; prepare_for_invocation(); return my_special_type{a, b}.magical_invocation(c); }
The sample code on has correctly got "return a;" on the first line of f2. https://godbolt.org/z/cg30-ch5.4
I may be the 17th person to report this ... but there's a very tiny nit on p280 of the published book.
"If we rewrite this function while observing ES.5: "Keep scopes small," we might arrive at this:
int f2(int a, int b, float c) { if (a > b) return; prepare_for_invocation(); return my_special_type{a, b}.magical_invocation(c); }
The sample code on has correctly got "return a;" on the first line of f2. https://godbolt.org/z/cg30-ch5.4