On 06/15/2012 10:27 AM, Paolo Carlini wrote:
The problem is that with the patch applied we get errors of the "no
matching function" type, instead of access control errors.

I suppose this is expected, right?!?

Yes, but when we're printing the candidates we need to give an access control error to explain why the candidate isn't viable.

The second pair is more subtle:

FAIL: g++.dg/template/friend13.C -std=c++11 (test for excess errors)
FAIL: g++.dg/template/friend15.C -std=c++98 (test for excess errors)
FAIL: g++.dg/template/friend15.C -std=c++11 (test for excess errors)

friend13 seems well-formed to me.

friend15 seems ill-formed since friends are no longer injected into the enclosing namespace, only found by argument-dependent lookup.

I don't see anything offhand that would cause these changes. I'll look deeper.

      added to the template at parsing time. Let's get those and perfom
      the acces checks then.  */

"perform the access"

+enforce_access (tree basetype_path, tree decl, tree diag_decl,
+               bool complain)

Let's use tsubst_flags_t for complain parms even if all we really need is a boolean value, to help with readability.

Jason

Reply via email to