-
-
Save brianosman/e2a37f5a9b5f8a47fd42a80fe35fc36e to your computer and use it in GitHub Desktop.
This file contains 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 <cstdio> | |
#include "other.h" | |
int main() { | |
Foo f = Foo::Make(1); | |
f.print_me(); | |
return 0; | |
} |
This file contains 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 "other.h" | |
#include <cstdio> | |
Foo Foo::Make(int v) { | |
return { v }; | |
} | |
void Foo::print_me() { | |
printf("Hello, I'm #%d\n", val); | |
} |
This file contains 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
struct Foo { | |
static Foo Make(int); | |
void print_me(); | |
int val; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment