Skip to content

Instantly share code, notes, and snippets.

@deoxxa
Created December 15, 2010 11:31
Show Gist options
  • Save deoxxa/741874 to your computer and use it in GitHub Desktop.
Save deoxxa/741874 to your computer and use it in GitHub Desktop.
--------
What I've got
--------
Hook< functor2<int,int,int> >* hook = new Hook< functor2<int,int,int> >;
hook->addCallback((functor2<int,int,int>::ftype)&multiply);
hook->addCallback((functor2<int,int,int>::ftype)&add);
printf("We have %d callback(s)\n\n", hook->numCallbacks());
functor2<int,int,int>::atype* args = new functor2<int,int,int>::atype(4, 5);
--------
What I'd like
--------
Hook< functor2<int,int,int> >* hook = new Hook< functor2<int,int,int> >;
hook->addCallback((hook->ftype)&multiply);
hook->addCallback((hook->ftype)&add);
printf("We have %d callback(s)\n\n", hook->numCallbacks());
hook->atype* args = new hook->atype(4, 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment