[Bug c++/53311] New: [C++0x] argument packs are not handled correctly in decltype
chesstr at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Thu May 10 21:08:00 GMT 2012
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: unassigned@gcc.gnu.org
ReportedBy: chesstr@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 )
More information about the Gcc-bugs
mailing list