Skip to content

Instantly share code, notes, and snippets.

@sheepmaster
Created March 19, 2012 21:57
Show Gist options
  • Select an option

  • Save sheepmaster/2127458 to your computer and use it in GitHub Desktop.

Select an option

Save sheepmaster/2127458 to your computer and use it in GitHub Desktop.
template <typename T>
class Bar {
private:
friend void T::FriendMethod();
static void PrivateMethod() {
}
};
class Foo {
private:
static void FriendMethod() {
Bar<Foo>::PrivateMethod();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment