3 Apr
2017
3 Apr
'17
5:09 p.m.
Tim Song wrote:
However, in C++14, variable templates have external linkage, so `inline` is not necessary for variable templates.
Indeed. They're templates after all.
As I understand it, this depends on Core issue 1713, whose unresolved status presumably led LWG to go with putting inline on everything at Kona (see P0607R0; LWG moved A and B2).
It makes no sense for variable templates to "not be inline", because that would make them useless. Templates are defined in headers. They have to be "inline" in the same way template functions have to be "inline" even when they aren't.