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: [C++1y] [PATCH 3/4] ... canonical type workaround and refactoring


On 09/24/2013 02:05 AM, Adam Butcher wrote:
Shall I push the patch below to trunk as an intermediate workaround
whilst I get to refactoring to support on-the-fly template parm synthesis?

I think let's wait for a better fix.

On the subject of on-the-fly synthesis: I haven't started yet but I'm
thinking to trigger in 'cp_parser_simple_type_specifier' when
'current_binding_level->kind == sk_function_parms'.  I can foresee a
potential issue with packs in that, upon reading the 'auto' (potentially
nested in some other type), a plain template parm will be synthesized;
but it may need to be a pack parm type if '...' is found later.

Hmm, good point.

I think there are two options:

1) Build up the type as normal and use tsubst to replace the non-pack template parameter with a pack if needed.

2) If we see 'auto', scan ahead (possibly via tentative parsing) to see if there's a ...

Jason


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