☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
diagnostic
/
pr90767-1.C
☽
☼
gcc/testsuite/g++.dg/diagnostic/pr90767-1.C
code
plain
raw
1
// PR c++/90767
2
// { dg-do compile }
3
4
struct X {
5
int n;
6
void foo (); // { dg-message "initializing argument 'this'" }
7
8
template<typename T>
9
operator T () const
10
{
11
if (n == 0)
12
foo (); // { dg-error "cannot convert 'const X\\*' to 'X\\*'" }
13
return n;
14
}
15
};