This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12531] Default value of a template with two template arguments not accepted
- From: "jfranzoy at yahoo dot com dot ar" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Oct 2003 14:10:13 -0000
- Subject: [Bug c++/12531] Default value of a template with two template arguments not accepted
- References: <20031006211542.12531.jfranzoy@yahoo.com.ar>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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) {}
};