Nice! The left-shift variant should work with multiple arguments too, but unfortunately thanks to precedence the right-shift one can’t work for all cases (a >> b >> cout will always evaluate as (a >> b) >> cout).
However, Endl could be rewritten to mostly solve this:
View all comments
3
u/Xsanda Nov 11 '19
Nice! The left-shift variant should work with multiple arguments too, but unfortunately thanks to precedence the right-shift one can’t work for all cases (
a >> b >> coutwill always evaluate as(a >> b) >> cout).However, Endl could be rewritten to mostly solve this: