Skip to content

Instantly share code, notes, and snippets.

@ben0x539
Created October 30, 2011 20:46
Show Gist options
  • Save ben0x539/1326418 to your computer and use it in GitHub Desktop.
Save ben0x539/1326418 to your computer and use it in GitHub Desktop.
class Foo {
public:
template<typename T>
void bar() {
T::derp();
}
};
class Helper {
public:
static void derp() {
std::cout << "Hello, world\n";
}
};
int main() {
Foo f;
f.bar<Helper>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment