Commit cae7d264 by Jason Merrill Committed by Jason Merrill

re PR c++/45917 (inaccessible types allowed as template argument in nested-name-specifier)

	PR c++/45917
	* parser.c (cp_parser_template_id): Don't forget access checks.

From-SVN: r196744
parent 7805032d
2013-03-16 Jason Merrill <jason@redhat.com>
PR c++/45917
* parser.c (cp_parser_template_id): Don't forget access checks.
PR c++/52374
* pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
......
......@@ -12818,7 +12818,7 @@ cp_parser_template_id (cp_parser *parser,
error_at (token->location, "parse error in template argument list");
}
pop_deferring_access_checks ();
pop_to_parent_deferring_access_checks ();
return template_id;
}
......
// PR c++/45917
template < typename T >
struct A { static int i; };
class B { typedef int X; }; // { dg-error "private" }
void f() { A<B::X>::i = 0; } // { dg-error "this context" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment