c++/7033: [2003-01-22] Matching of template patterns

Wolfgang Bangerth bangerth@ticam.utexas.edu
Thu Jan 23 02:56:00 GMT 2003


The following reply was made to PR c++/7033; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-bugs@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>
Cc: Theodore.Papadopoulo@sophia.inria.fr, <Lionel.Champalaune@sophia.inria.fr>
Subject: Re: c++/7033: [2003-01-22] Matching of template patterns
Date: Wed, 22 Jan 2003 20:55:33 -0600 (CST)

 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/
 
 



More information about the Gcc-prs mailing list