Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/overload14.C

raw
1 // { dg-do assemble }
2 //
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 18 Jan 2001 <[email protected]>
5
6 // Bug 1639. We failed to have builtin relop candidates with enumeral type.
7
8 template <typename T1, typename T2> void operator == (T1, T2);
9
10 enum E {e1};
11 void operator != (E, E);
12
13 bool Foo (E e)
14 {
15 return e == e1;
16 }
17 bool Baz (E e)
18 {
19 return e != e1; // { dg-error "" } void not ignored.
20 }