re PR c++/51148 ([C++0x] Unexpanded template param packs wrongly accepted in friend class declarations)

PR c++/51148
	* friend.c (make_friend_class): Call check_for_bare_parameter_packs.

From-SVN: r186495
This commit is contained in:
Jason Merrill 2012-04-16 10:15:36 -04:00 committed by Jason Merrill
parent ac9a074c72
commit 1c4010c6d6
4 changed files with 28 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2012-04-16 Jason Merrill <jason@redhat.com>
PR c++/51148
* friend.c (make_friend_class): Call check_for_bare_parameter_packs.
2012-04-16 Jan Hubicka <jh@suse.cz>
* decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH

View file

@ -239,6 +239,9 @@ make_friend_class (tree type, tree friend_type, bool complain)
friend_type = cv_unqualified (friend_type);
if (check_for_bare_parameter_packs (friend_type))
return;
if (friend_depth)
/* If the TYPE is a template then it makes sense for it to be
friends with itself; this means that each instantiation is

View file

@ -1,3 +1,8 @@
2012-04-16 Jason Merrill <jason@redhat.com>
PR c++/51148
* g++.dg/cpp0x/variadic127.C: New.
2012-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lib/plugin-support.exp (plugin-test-execute): Properly determine

View file

@ -0,0 +1,15 @@
// PR c++/51148
// { dg-do compile { target c++11 } }
template<typename... Types>
struct S
{};
template<typename... Types>
struct T
{
friend class S<Types>; // { dg-error "parameter packs not expanded" }
};
int main()
{}