struct AB { int a; int b; }; int foo(AB ab) { return ab.a + ab.b; } int bar(const AB& ab) { return ab.a + ab.b; }