Definitions and ODR (One Definition Rule)

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

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
CWG 261C++98a deallocation function for a polymorphic classmight be odr-used even if there were no relevantnew or delete expressions in the programsupplemented theodr-use cases to coverconstructors and destructors
CWG 678C++98an entity could have definitionswith different language linkagesthe behavior isundefined in this case
CWG 1472C++98reference variables which satisfy the requirements forappearing in a constant expression were odr-used evenif the lvalue-to-rvalue conversion is immediately appliedthey are notodr-used in this case
CWG 1614C++98taking address of a pure virtual function odr-used itthe function is not odr-used
CWG 1741C++98constant objects that are immediately lvalue-to-rvalueconverted in potentially-evaluated expressions were odr-usedthey are not odr-used
CWG 1926C++98array subscript expressions did not propagate potential resultsthey propagate
CWG 2242C++98it was unclear whether a const object that is onlyconstant-initialized in part of its definitions violates ODRODR is not violated; the object isconstant-initialized in this case
CWG 2300C++11lambda expressions in different translationunits could never have the same closure typethe closure type can be thesame under one definition rule
CWG 2353C++98a static data member was not a potential resultof a member access expression accessing itit is
CWG 2433C++14a variable template could not havemultiple definitions in a programit can