mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-25 16:50:49 +08:00
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:
parent
39ca067c63
commit
7a925598cd
@ -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.
|
||||
|
19
gcc/testsuite/g++.dg/lookup/using8.C
Normal file
19
gcc/testsuite/g++.dg/lookup/using8.C
Normal 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>;
|
@ -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" "" }
|
||||
|
Loading…
x
Reference in New Issue
Block a user