Skip to content

Instantly share code, notes, and snippets.

@eyelash
Created September 21, 2017 18:49
Show Gist options
  • Select an option

  • Save eyelash/66a0bc531f9a6aba06e8f0cc99a23c9f to your computer and use it in GitHub Desktop.

Select an option

Save eyelash/66a0bc531f9a6aba06e8f0cc99a23c9f to your computer and use it in GitHub Desktop.
template <typename T> struct A {
virtual void foo() = 0;
};
template <typename T> struct B: A<T> {
template <typename T2> void foo(A<T2>& a) {
a.foo();
}
};
template <typename T> struct C: B<T> {
void foo() override {
using B<T>::foo;
}
};
int main() {
C<float> c;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment