re PR c++/11097 (using template operator is broken)

PR c++/11097
	* g++.dg/other/error5.C: Modify the error message.
	* g++.dg/lookup/using8.C: New test.

From-SVN: r72211
This commit is contained in:
Giovanni Bajo 2003-10-08 01:54:11 +02:00 committed by Bernardo Innocenti
parent 39ca067c63
commit 7a925598cd
3 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
PR c++/11097
* g++.dg/other/error5.C: Modify the error message.
* g++.dg/lookup/using8.C: New test.
2003-10-07 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/darwin-abi-2.c: New file.

View File

@ -0,0 +1,19 @@
// { dg-do compile }
// Origin: Bill Clarke <llib at computer dot org>
// PR c++/11097: using declartion for a converter operator to a nested class
// in a base type
template <typename T>
struct A
{
struct Nested {};
operator Nested*();
};
template <typename T>
struct B : A<T>
{
using A<T>::operator typename A<T>::Nested*;
};
template struct B<int>;

View File

@ -7,7 +7,7 @@ template <typename T> struct S {
};
template <typename T> struct S2 : S<T> {
using S<T>::operator typename S<T>::I*; // { dg-error "operator S\\<T\\>" "" }
using S<T>::operator typename S<T>::I*; // { dg-error "operator S\\<int\\>" "" }
};
template struct S2<int>; // { dg-error "instantiated" "" }