Код: Выделить всё
struct Plus {
inline int operator()(int x, int y) const {
return x + y;
}
};
template
struct Foo {
Fct fct;
Foo(Fct f) : fct(f) {}
inline int add(int x, int y) {
return fct(x,y); // same efficiency adding directly?
}
};
Подробнее здесь: https://stackoverflow.com/questions/274 ... ct-inlined
Мобильная версия