This is the mail archive of the gcc-patches@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]

Re: Re: C++ PATCH: PR 20599 (variadic templates, take two) (1/4)


On 10/12/06, Jason Merrill <jason@redhat.com> wrote:
Doug Gregor wrote:
> On 10/11/06, Jason Merrill <jason@redhat.com> wrote:

>> Right.  Perhaps thinking about packing and unpacking with that tree code
>> is the wrong level of granularity.  The PACK_UNPACK_* code just deals
>> with the substitution, creating a new pack based on the argument packs.
>> It's the context in which it's used that actually does the unpacking,
>> right? "Tail..." just represents a pack.
>
> Yes, you're right. It's a placeholder for an expression or type that,
> after substitution, will become zero or more expressions or types.

So can we change the name to {TYPE,EXPR}_SUBST_PACK or something else
less misleading?  Thinking of it as a "substitution pack" seems clearer.

Sure. We should rename the PACK_UNPACK_* macros as well to use SUBST_PACK:


 PACK_UNPACK_P becomes SUBST_PACK_P
 PACK_UNPACK_PATTERN becomes SUBST_PACK_PATTERN
 SET_PACK_UNPACK_PATTERN becomes SET_SUBST_PACK_PATTERN
 PACK_UNPACK_PARAMETER_PACKS becomes SUBST_PACK_PARAMETER_PACKS

I can submit an updated patch, if that would make it easier to review.
Otherwise, there's a minor ICE in process_partial_specialization
(where we check that non-type template arguments to partial
specializations don't have dependent types) that I plan to fix in the
next couple of days.

 Cheers,
 Doug


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