This is the mail archive of the
mailing list for the GCC project.
Re: [c++-concepts] Class template constraints
- From: Jason Merrill <jason at redhat dot com>
- To: Andrew Sutton <andrew dot n dot sutton at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- Date: Wed, 04 Sep 2013 13:17:04 -0400
- Subject: Re: [c++-concepts] Class template constraints
- Authentication-results: sourceware.org; auth=none
- References: <CANq5SysAD-Dqupb5UVYJWx1c2_Bh2YbHMA86hdvk0J_dvPnPSA at mail dot gmail dot com> <52274F43 dot 5020002 at redhat dot com> <CANq5Syt+5xzFKwGopVsKxcr_S8nLAVgd5RSBdYmWCxOWxwGNNQ at mail dot gmail dot com>
On 09/04/2013 11:59 AM, Andrew Sutton wrote:
It's not supposed to be different. Checking constraints in
instantiate_template is actually too late. We want to check before
instantiation, at the point of use.
Right, what I was getting at is that instantiate_template actually only
instantiates the declaration of a function, not the definition, so it
corresponds to lookup_template_class for class templates.
instantiate_decl is what actually instantiates the body. Confusing
internal function naming.
I think that the absence of constraints fits into those definition
nicely, since it represents the empty set of propositions.
Oh, did the comment just mean that absence is equivalent to absence? I
thought the comment was saying that absence is considered equivalent to
anything else. Just tweak the comment, then.