What exactly is One Definition Rule in C++? -


what 1 definition rule in c++ say? trustworthy occurence can find in the c++ programming language, 3rd. ed., p. 9.2.3. there official definition of rule except that?

the truth in standard (3.2 1 definition rule) :

no translation unit shall contain more 1 definition of variable, function, class type, enumeration type or template.

[...]

every program shall contain 1 definition of every non-inline function or object that used in program; no diagnostic required. definition can appear explicitly in program, can found in standard or user-defined library, or (when appropriate) implicitly defined (see 12.1, 12.4 , 12.8). inline function shall defined in every translation unit in used.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -