#include using namespace std; template void caller(Fun fun, ArgType &&arg) { fun(std::forward(arg)); } void display(ostream &out) { out << "Hello fm display\n"; } void increment(int &x) { ++x; } int main() { int x = 0; caller(display, cout); caller(increment, x); cout << "x is now: " << x << '\n'; }