re PR c++/9602 (Total confusion about template/friend/virtual/abstract)

PR c++/9602
	* typeck2.c (abstract_virtuals_error): Don't check when
	TYPE is still template parameter dependent.

	* g++.dg/template/friend16.C: New test.

From-SVN: r63362
This commit is contained in:
Kriang Lerdsuwanakij 2003-02-24 15:47:24 +00:00 committed by Kriang Lerdsuwanakij
parent 44ee6e9e62
commit 9e236a9d66
4 changed files with 32 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9602
* typeck2.c (abstract_virtuals_error): Don't check when
TYPE is still template parameter dependent.
2003-02-23 Mark Mitchell <mark@codesourcery.com>
PR c++/5333

View File

@ -143,6 +143,11 @@ abstract_virtuals_error (decl, type)
CLASSTYPE_PURE_VIRTUALS holds the inline friends. */
return 0;
if (dependent_type_p (type))
/* For a dependent type, we do not yet know which functions are pure
virtuals. */
return 0;
u = CLASSTYPE_PURE_VIRTUALS (type);
if (decl)
{

View File

@ -1,3 +1,8 @@
2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9602
* g++.dg/template/friend16.C: New test.
2003-02-23 Mark Mitchell <mark@codesourcery.com>
PR c++/5333

View File

@ -0,0 +1,16 @@
// { dg-do compile }
// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
// PR c++/9602: Inline friend/pure virtual tree data sharing in
// class template.
template <typename T> struct X {
void foo (X);
friend void bar () {}
};
template <typename T>
void X<T>::foo (X x) {}
template struct X<int>;