summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/overload9.C
blob: b24a1f6479f7cc071dc472f71549e99b6040f4cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// GROUPS passed overloading
class CLogger			// { dg-message "candidate" }
{
public:
      void operator() (int,const char *) {}; // { dg-message "note" }
      void operator() (int,const char *, ...) {}; // { dg-message "note" }
} Log;

class CGLogger : public CLogger	// { dg-message "candidate" }
{
} GLog;

int main()
{
        Log(1,"Test");// { dg-error "ambiguous" }
        Log(1,"Test %d",3);
        GLog(1,"Test");// { dg-error "ambiguous" }
        GLog(1,"Test %d",3);
}