Explain one-definition rule (ODR).
Page 1 of 1
Explain one-definition rule (ODR).
According to one-definition rule, C++ constructs must be identically defined in every compilation unit they are used in.
As per ODR, two definitions contained in different source files are called to be identically defined if they token-for-token identical. The tokens should have same meaning in both source files.
Identically defined doesn’t mean character-by-character equivalence. Two definitions can have different whitespace or comments and yet be identical.
Similar topics
» What is SRF Files? Explain with an example.
» Explain the problem with COM.
» What is Stack? Explain its uses
» Explain abstraction.
» Explain container class.
» Explain the problem with COM.
» What is Stack? Explain its uses
» Explain abstraction.
» Explain container class.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|