This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66596] Type that is not dependent on the variable template template parameters
- From: "ed at catmur dot co.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Jun 2015 09:24:16 +0000
- Subject: [Bug c++/66596] Type that is not dependent on the variable template template parameters
- Auto-submitted: auto-generated
- References: <bug-66596-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66596
--- Comment #1 from Ed Catmur <ed at catmur dot co.uk> ---
Note: error produced is:
prog.cc: In instantiation of 'void g() [with T = int]':
prog.cc:6:21: required from here
prog.cc:5:30: error: 'U::f()' is not a member of 'V'
template<class T> void g() { t<T>.f(); }
^
If the type of the non-specialized variable template t is made formally
dependent on its template parameters, then the program compiles fine:
template<class T> decltype((T*)0, *(U*)0) t;
template<> V t<int>;