http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53311
Bug #: 53311 Summary: [C++0x] argument packs are not handled correctly in decltype Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ches...@hotmail.com Created attachment 27368 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27368 test case with both errors Hi, it seems there are two major argument pack expansion problems in decltype : 1. mismatched argument pack lengths while expanding std::forward<Ts>(args)... from sample code : ===================================== > template<class func,class...arg3Ts> > auto testbug1(func fun,arg2Ts...arg2s,arg3Ts...arg3s) -> > decltype(fun(std::forward<arg2Ts>(arg2s)...,std::forward<arg3Ts>(arg3s)...)) > { > return > fun(std::forward<arg2Ts>(arg2s)...,std::forward<arg3Ts>(arg3s)...); > } ===================================== 2. 0 length argument packs in decltype result in ICE ( Bug 53307 : http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53307 )