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++-concepts] Class template constraints


>> 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.

Ah. The goal is to check after we've deduced/coerced template
arguments into a valid substitution. With functions, that's in
fn_type_unification (hopefully called from instantiate_template), and
for classes in lookup_template_class.

There are some other places too: get_class_bindings for partial
specializations, and determine_specialization for explicit
specializations.


> 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.

Sounds good.

Andrew


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