Created
October 12, 2018 13:05
-
-
Save carmel4a/98d74045464c5bdea22098b1ff19fbbc 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
// definition - with `{}` | |
(1) Post processed cpp file. | |
// From header | |
class Foo // definition | |
{ | |
void f(); // declaration | |
}; | |
// From implementation file | |
void Foo::f() // definition | |
{ | |
} | |
// Ok | |
(2) Post processed cpp file. | |
// From header | |
class Foo // definition | |
{ | |
void f(); // declaration | |
}; | |
// From implementation file | |
// From header | |
class Foo // Foo is 2nd time defined! | |
{ | |
void f(); // declaration | |
}; | |
void Foo::f() // that's still ok. | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment