This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-19
[Accepted at the November, 2020 meeting as part of paper P1787R6 and moved to DR at the February, 2021 meeting.]
The relationship between declarations and definitions of variable templates is not clear. For example:
template<typename T> auto var0 = T(); // #1a. template<typename T> extern T var0; // #1b. template<typename T> T var1; // #2a. template<typename T> extern auto var1; // #2b. template<typename T> extern T var1; // #2c. template<typename T> T var1; // #2d.
Questions:
When is a variable template declaration a definition and when a non-defining declaration?
What declarations are valid?
Should auto declarations be allowed?
To what extent, if any, do these involve type matching?
How are types matched, especially in the presence of auto?
Proposed resolution (May, 2017):
This issue is resolved by the resolution of issue 1704.