This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7033: [2003-01-22] Matching of template patterns
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: gcc-bugs at gcc dot gnu dot org, <gcc-gnats at gcc dot gnu dot org>
- Cc: Theodore dot Papadopoulo at sophia dot inria dot fr, <Lionel dot Champalaune at sophia dot inria dot fr>
- Date: Wed, 22 Jan 2003 20:55:33 -0600 (CST)
- Subject: Re: c++/7033: [2003-01-22] Matching of template patterns
This report can be reduced to the following snippet:
------------------------------
template <typename, typename> struct S;
template <template <typename> class C,
typename T,
typename V>
struct S<C<T>,typename C<T>::template it<V> > {
typedef int it;
};
template <typename> struct U {
template <typename> struct it {
it (int);
};
};
int main() {
typedef U<int> c2i;
S<c2i,c2i::it<int> >::it it;
};
-------------------------------
The question is: will the template list in the last line match the
specialization of S or not. gcc says "no" and complains about the
incomplete general template S when creating the variable.
FWIW, icc agrees with gcc here. I have no opinion.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth/