[Bug c++/88358] New: variable template definition taken as function template declaration with implicit typename
blitzrakete at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Dec 4 18:04:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88358
Bug ID: 88358
Summary: variable template definition taken as function
template declaration with implicit typename
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: blitzrakete at gmail dot com
Target Milestone: ---
Consider the following (compiled with `-std=c++2a`):
template <typename T>
void f(T::type); // ill-formed, gcc accepts
gcc seems to think that this is a function template declaration. In fact, it is
not, it's an ill-formed variable template. It's also a regression I think in a
way
template <typename T>
int pi(T::your_pi); // variable template, but gcc trunk thinks this is a
function template
More information about the Gcc-bugs
mailing list