This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66596] New: Type that is not dependent on the variable template template parameters
- From: "pau.montequi at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Jun 2015 07:35:23 +0000
- Subject: [Bug c++/66596] New: Type that is not dependent on the variable template template parameters
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66596
Bug ID: 66596
Summary: Type that is not dependent on the variable template
template parameters
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pau.montequi at gmail dot com
Target Milestone: ---
The bug appears to be that where the non-specialized variable template has a
type that is not dependent on the variable template template parameters, gcc
assumes within template methods that use that variable template that the
variable template always has that type.
struct U { void f() {} };
struct V { void f() {} };
template<class T> U t;
template<> V t<int>;
template<class T> void g() { t<T>.f(); }
int main() { g<int>(); }
SO thread: http://stackoverflow.com/a/30910509/499359