summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/overload14.C
blob: 92142d2fc021d2f79e690e6298ee025a72b0f520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// 
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 18 Jan 2001 <nathan@codesourcery.com>

// Bug 1639. We failed to have builtin relop candidates with enumeral type.

template <typename T1, typename T2> void operator == (T1, T2);

enum E {e1};
void operator != (E, E);

bool Foo (E e)
{
  return e == e1;
}
bool Baz (E e)
{
  return e != e1; // { dg-error "" } void not ignored.
}