Skip to content

Instantly share code, notes, and snippets.

@hkaiser
Forked from brycelelbach/gist:4005495
Created November 3, 2012 02:05
Show Gist options
  • Save hkaiser/4005507 to your computer and use it in GitHub Desktop.
Save hkaiser/4005507 to your computer and use it in GitHub Desktop.
void f()
{
//use dynamic loading to load and invoke visit here
}
template<
void (*F)()
>
struct action
{
void use()
{
(*F)();
}
};
int main()
{
action<&f> act;
act.use();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment