Commit 9bdfe704 by Giovanni Bajo

re PR c++/14250 (switch() does not seem to see operator int() in template class)

	PR c++/14250
	* g++.dg/other/switch1.C: New test.

From-SVN: r78295
parent bba745c1
2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14250
* g++.dg/other/switch1.C: New test.
2004-02-23 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/cast-function-1.c: Adjust for new informative message.
......
// { dg-do compile }
// Contributed by: Nick Savoiu <savoiu at ics dot uci dot edu>
// PR c++/14250: Incomplete type in switch statement
template <typename T>
struct A {
operator int();
};
struct C1 {
static A<void> t1;
void fun()
{
switch(t1)
{
default: break;
}
}
};
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