brintos

brintos / llvm-project-archived public Read only

0
0
Text · 457 B · e84c651 Raw
25 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++112 3struct A {};4 5struct R {6    operator const A*();7};8 9 10struct B  : R {11    operator A*();12};13 14struct C : B {15 16};17 18 19void foo(C c, int A::* pmf) {20	int i = c->*pmf; 	// expected-error {{use of overloaded operator '->*' is ambiguous}} \21				// expected-note {{built-in candidate operator->*(const struct A *, int A::*)}} \22				// expected-note {{built-in candidate operator->*(struct A *, int A::*)}}23}24 25