summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/conversion10.C
blob: 8cbba413da73d104bbc245ad2d6d6fcf3e336af7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do assemble  }
// PRMS Id: 9019
// Bug: g++ doesn't find conversion to const char *.

struct String {
  String ();
  explicit String (const char *);
  operator const char * ();
};

int main(int argc, char **argv) 
{
	String deflt("no args");
	String useme;

	const char *p = (argv[1]) ? argv[1] : deflt;

	return 0;
}