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]

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/



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