This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/66596] Type that is not dependent on the variable template template parameters


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>;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]