Commit 7a925598 by Giovanni Bajo Committed by Bernardo Innocenti

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
parent 39ca067c
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.
......
// { 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" "" }
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