I have encountered this T.C.'s amazing answer (edit: which I now consider wrong) and have a follow-up question. Please consider a code where I use constantly initialized constant variables of integral types declared in global namespace scope to either constantly initialize constant static data members or declare array data members of my classes. Example for better illustration:
const int internal_linkage_constant = 1;
class ExternalLinkageClass
{
static const int constexpr_value = internal_linkage_constant; // #1
int arr[internal_linkage_constant]; // #2
};
Definitions of all these classes are in header files and might be shared among multiple translation units. Global constants must be defined before these definitions and inherently cannot have external linkage in order to be used in constant expressions. Now my question is: do such initializations lead to undefined behavior due to ODR violation?