Definitions and ODR

Definitions and ODR

Definitions are declarations that fully define the entity introduced by the declaration. Every declaration is a definition, except for the following:

  • A function declaration without a function body
int f(int); // declares, but doesn't define f
extern const int a; // declares, but doesn't define a
extern const int b = 1; // defines b