This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] [PR17447] Check incomplete types of parameters in templates
Gabriel Dos Reis wrote:
> I thought the common practice had been to avoid uses_template_parms,
> in preference of dependent_xxx_p.
AFAICT, not after Mark rewrote it before 3.4 to avoid using walk_tree and
allocating a hash table (that is, painfully slow). dependent_type_p won't work
here as-is, I would have to put ++processing_template_decl before
and --processing_template_decl after its use, which is exactly what
uses_template_parms does.
It could be argued that dependent_type_p should work also outside templates,
and then fix all its uses. I would support that, but it's a cleanup for 4.1 at
this point, and surely this patch can live with uses_template_parms at the
moment.
Giovanni Bajo