1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // Make sure that copy constructors and assignment operators are properly
4 // generated when there is a matching
11 : value(other
.value
+ 1) { } // expected-error{{binary expression}}
14 X
& operator=(const X
<U
>& other
) {
15 value
= other
.value
+ 1; // expected-error{{binary expression}}
24 X
<int Y::*> test0(X
<int Y::*> x
) { return x
; }
25 X
<int> test1(X
<long> x
) { return x
; }
28 X
<int> test2(X
<int Y::*> x
) {
29 return x
; // expected-note{{instantiation}}
32 void test3(X
<int> &x
, X
<int> xi
, X
<long> xl
, X
<int Y::*> xmptr
) {
35 x
= xmptr
; // expected-note{{instantiation}}
39 X1
&operator=(const X1
&);
44 template<typename U
> X2
&operator=(const U
&);
50 void test_X2(X3
&to
, X3 from
) {