This behavior annoys me again and again. The cause of the problem is that your
A(int n): v(n, A::kDefaultValue) {}
The odr-uses memberstatic constexpr, since the constructorvaccepts a permalink of the second argument. To use Odr, a definition is required somewhere, i.e.
const int A::kDefaultValue;
( main()). ++ 17, ( ) .
(, ), , -
A(int n): v(n, int(A::kDefaultValue)) {}
v ( , ).