<div class="gmail_quote">On Sun, Apr 29, 2012 at 2:44 PM, Nathan Ridge <span dir="ltr"><<a href="mailto:zeratul976@hotmail.com" target="_blank">zeratul976@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div><br>
> Hello,<br>
><br>
> The following code fails to compile with Clang trunk:<br>
><br>
> template <class T, class U><br>
> struct pair<br>
> {<br>
>      T first;<br>
>      U second;<br>
><br>
>      pair() : first(), second() {}<br>
><br>
>      pair(const pair&) = default;<br>
> };<br>
><br>
> struct S<br>
> {<br>
>      S() {}<br>
>      S(const S&) = delete;<br>
>      S(S&&) = default;<br>
> };<br>
><br>
> int main()<br>
> {<br>
>      pair<int, S> p;<br>
> }<br>
><br>
> The errors are:<br>
><br>
> test.cpp:9:5: error: the parameter for this explicitly-defaulted copy<br>
> constructor is const, but a member or base requires it to be<br>
>        non-const<br>
>      pair(const pair&) = default;<br>
>      ^<br>
> test.cpp:21:18: note: in instantiation of template class 'pair<int, S>'<br>
> requested here<br>
>      pair<int, S> p;<br>
>                   ^<br>
><br>
> Thanks for the report! This issue was fixed over a week ago. Trunk<br>
> clang accepts your code.<br>
<br>
</div></div>Ok, cool! Will it be fixed in the 3.1 branch?<br></blockquote></div><br><div>Yes.</div>