C++ PATCH for c++/36846 and other variadic template issues

Jason Merrill jason@redhat.com
Wed Jan 7 21:01:00 GMT 2009


This patch fixes several related issues with variadic templates and 
partial specializations.  A partial specialization with two separate 
parameter packs was being handled badly: when we would go to look up the 
class or its member, we would flatten the argument packs and then assign 
all of the arguments to the first parameter pack.  The fix is to not 
flatten the argument packs, as any time we're trying to fit arguments 
into more than one parameter pack, we know that the arguments will 
already be properly packed as we must be dealing with a partial 
specialization.

35297 is a separate issue, but the fix is trivial: it's ok to have a 
parameter pack with no default argument.

35722 is not fixed by this patch, but I changed the (previously correct, 
now incorrect) error to a sorry.

Tested x86_64-pc-linux-gnu, applied to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 36846.patch
Type: text/x-patch
Size: 17490 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090107/fe0fe463/attachment.bin>


More information about the Gcc-patches mailing list