Last active
January 21, 2016 10:37
-
-
Save tetsuok/563bde9f35e9dd9d5576 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
class A { | |
public: | |
virtual ~A() {} | |
virtual void f(int) {} | |
}; | |
class B : public A { | |
public: | |
void f(size_t) override {} // error | |
}; | |
int main() { | |
A* b = new B; | |
b->f(0); | |
return 0; | |
} |
Author
tetsuok
commented
Jan 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment