This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16829] default parameter can be not one of the last in template function
- From: "charles at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jul 2004 04:04:44 -0000
- Subject: [Bug c++/16829] default parameter can be not one of the last in template function
- References: <20040730035150.16829.charles@kde.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From charles at kde dot org 2004-07-30 04:04 -------
And now I have the ICE (which may be rather unrelated):
template <class A> void foo(A a, int c=0, int d)
{ }
int main()
{
foo(0);
}
To reproduce this, create a template function in which a parameter has a
default value, but it has a parameter after it without a default value. Then
try to call that template function where the number of parameters passed is
the number of parameters that have no default, up to the one that does have a
default. (whew!)
reproduced on:
gcc version 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16829