Код: Выделить всё
struct Foo {
int operator()(int) const;
};
int foo(Foo b) {
return b(17);
}
Код: Выделить всё
foo(Foo):
sub rsp, 24
mov esi, 17
lea rdi, [rsp+15]
call Foo::operator()(int) const
add rsp, 24
ret
Код: Выделить всё
struct Baz {
int i;
int j;
int k;
int u;
int v;
int z;
int operator()(int) const;
};
Код: Выделить всё
baz(Baz):
sub rsp, 8
mov esi, 17
lea rdi, [rsp+16]
call Baz::operator()(int) const
add rsp, 8
ret
Подробнее здесь: https://stackoverflow.com/questions/791 ... ass-map-to