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]

[Bug c++/16829] default parameter can be not one of the last in template function


------- 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


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