Matching on Outer Template Parameters

Tyson Whitehead twhitehe@uwo.ca
Sat Sep 11 15:31:00 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I tried gcc 3.5 this morning, the one provided in the Debian experimental 
distribution -- g++-3.5 (GCC) 3.5.0 20040724 (experimental) (Debian 
3.5-0pre1).  Matching on outer template parameters still does not work (bugs 
4882, 13088, and 14032).  Again:

template<typename t>
struct A {
  template<typename,typename>
  struct B { };

  template<typename d>
  struct B<t,d> { typedef int type; };
};

int main(){
  A<void>::B<void,void>::type val = 0;
  return val;
}

Bug.cpp:11: error: `type' is not a member of `A<void>::B<void, void>'

The code compiles fine with icc (Intel), cxx (Digital), and apparently Comeau 
C/C++.

- -T

PS:  As a bit of a side note, bug 13088 did actually contain two different 
bugs.  The original is a duplicate of bug 4882.  The one it picked up with 
the nested_deductions code, nested templates not matching on template 
template specializations [see original post for vastly simplified code], has 
been fixed.

- -- 
 Tyson Whitehead  (-twhitehe@uwo.ca -- WSC-)
 Computer Engineer                          Dept. of Applied Mathematics,
 Graduate Student- Applied Mathematics      University of Western Ontario,
 GnuPG Key ID# 0x8A2AB5D8                   London, Ontario, Canada
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBQv9oRXbLmIoqtdgRAjJUAJ4m3Sitx0DjKlk1GmYc37njcnd/HgCgsn2M
0g94MdEpWKBnPSsIkNog4xI=
=3atT
-----END PGP SIGNATURE-----



More information about the Gcc mailing list