On Sat, Jun 22, 2013 at 12:11 PM, Gabriel Dos Reis <g...@axiomatics.org> wrote: > Andrew Sutton <andrew.n.sut...@gmail.com> writes: > > | I the long term, I think we'll end up having constraints attached to > | declarations wherever we constrain auto (PARM_DECL, VAR_DECL, etc). > | Although now that I'm looking, it seems that lang_decl_parm does not > | inherit lang_min. Hmm... > | > | Mostly, though, I'm not sure where I could put it where both > | TEMPLATE_DECL and FUNCTION_DECL would have constraints. > > I think we want constraints for: > > * FUNCTION_DECL > * TEMPLATE_DECL > * TYPE_DECL > * TEMPLATE_PARM_DECL
Well, thinking more about it, I believe we want it only for * TEMPLATE_DECL * TEMPLATE_PARM_DECL. The FUNCTION_DECL and the TYPE_DECL gets their constraints from the abstract instantiation of the associated TEMPLATE_DECL. The comment for PARM_DECL extends to VAR_DECL -- only temploids get constraints and non-temploid vars declared 'auto' at the source level have types that are TEMPLATE_TYPE_PARM, hence should get their constraints properly set. -- Gaby