<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi, I am using clang (clang version 3.8.0-+rc2-1~exp1ubuntu2 (tags/RELEASE_380/rc2)) on xubuntu 16.04 beta1 to build my project, and met an issue as follows. It seems like a regression, since we have been using clang 3.6.2 to build our project with no issue, and this sample code could build successfully with clang 3.6.2. Could you help take a look? Thanks.</div><div dir="ltr"> </div><div dir="ltr">01 #include <iostream><br>02 template <class T> class Foo {<br>03 public:<br>04 __declspec(property(get=get_Data)) T const& Data;<br>05 T const& get_Data() const { return data_; }<br>06 __declspec(property(get=get_Data)) T & Data;<br>07 T & get_Data() { return data_; }<br>08 private:<br>09 T data_;<br>10 };<br>11 void print(int const & val){ std::cout << val; }<br>12 int main(int argc, char** argv) {<br>13 Foo<int> foo;<br>14 print(foo.get_Data());<br>15 print(foo.Data);<br>16 }</div><div dir="ltr">./foo.cpp:15:15: error: reference to 'Data' is ambiguous<br> print(foo.Data);<br> ^<br>./foo.cpp:4:49: note: candidate found by name lookup is 'Foo<int>::Data'<br> __declspec(property(get=get_Data)) T const& Data;<br> ^<br>./foo.cpp:6:44: note: candidate found by name lookup is 'Foo<int>::Data'<br> __declspec(property(get=get_Data)) T & Data;<br> ^</div><div dir="ltr"> </div><div dir="ltr"><br> </div>
</div></body>
</html>