Is this, line of code that is presented below and under this sentence, considered a declaration or definition?
extern const int &ri;
It's a declaration- the "extern" means that it lives somewhere else.
C++03, §3.1, ¶2:
A declaration is a definition unless ... it contains the extern specifier or a linkage- specification and neither an initializer nor a function-body ...
So, extern const int &ri;, which contains the extern specifier and not an initializer is a declaration but not a definition.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With