Skip to content

Instantly share code, notes, and snippets.

@carmel4a
Created October 12, 2018 13:05
Show Gist options
  • Save carmel4a/98d74045464c5bdea22098b1ff19fbbc to your computer and use it in GitHub Desktop.
Save carmel4a/98d74045464c5bdea22098b1ff19fbbc to your computer and use it in GitHub Desktop.
// 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