| | | | | |

Test Drive 2

void TestFunction (int i, double d)
{
  std::cout << "TestFunction(" << i << ", " << d << ") called\n";
}

int main()
{
  Functor<void, TYPELIST_2(int, double)> cmd(TestFunction);
  cmd(4, 4.5); // output: "TestFunction(4, 4.5) called"
}

| | Top of Page | 8. Generalized Functors - 13 of 26