<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"> Hi to all:<br>I have a test case which work well on VS2012,but i got an error when i compile it with clang++.<br>the test case is:<br>#include <iostream><br><br>class AA {<br> public:<br>  AA(int i):ii(i){}<br>  ~AA(){}<br> public:  <br>  int ii; <br>};<br><br>int foo( AA& a) {<br>  return a.ii;<br>}<br><br>int main() {<br>  AA aa(1);<br>  int rec1 = foo(aa);<br>  int rec2 = foo(AA(1));<br>  std::cout << rec1 << '\n' << rec2 << '\n';<br>  return rec1 == rec2? 0 : 1;<br>}<br><br>the error is:<br>reference_test.cpp:18:14: error: no matching function for call to 'foo'<br>  int rec2 = foo(AA(1));<br><br>Is it a bug of clang or not?  <br></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>