[Bug c++/12531] Default value of a template with two template arguments not accepted

jfranzoy at yahoo dot com dot ar gcc-bugzilla@gcc.gnu.org
Tue Oct 7 14:10:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12531



------- Additional Comments From jfranzoy at yahoo dot com dot ar  2003-10-07 14:10 -------
There is a workaround that works for some cases.
template<class T,class U>
struct X {
  static const int value = 1;
};
struct Y {
   typedef X<int,int>  XIntInt;
   Y(int i = XIntInt::value) {}
};

It does not apply to some template constructors:
struct Y {
   // typedef X<???,???> XT1T2;
   template<class T1> T ( int i = X<T,T>::value) {}
};



More information about the Gcc-bugs mailing list