<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - C++11 uniform-init of non-const references produces code that crashes"
href="http://llvm.org/bugs/show_bug.cgi?id=20844">bug 20844</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - C++11 uniform-init of non-const references produces code that crashes"
href="http://llvm.org/bugs/show_bug.cgi?id=20844#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - C++11 uniform-init of non-const references produces code that crashes"
href="http://llvm.org/bugs/show_bug.cgi?id=20844">bug 20844</a>
from <span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span></b>
<pre>Fixed in r217197:
/usr/local/google/home/richardsmith/Downloads/brace_ref_init (1).cpp:27:17:
error: no viable conversion from 'S' to 'uint64_t' (aka 'unsigned long')
X(T& v) : d{v} {} // brace-init of d causes incorect behaviour
^
/usr/local/google/home/richardsmith/Downloads/brace_ref_init (1).cpp:39:13:
note: in instantiation of function template specialization 'X::X<S>' requested
here
const X x1{s};
^
/usr/local/google/home/richardsmith/Downloads/brace_ref_init (1).cpp:15:5:
note: candidate function
operator D& () { return d; }
^
/usr/local/google/home/richardsmith/Downloads/brace_ref_init (1).cpp:16:5:
note: candidate function
operator const D& () const { return d; }
^
/usr/local/google/home/richardsmith/Downloads/brace_ref_init (1).cpp:32:8:
note: in initialization of temporary of type 'D' created to list-initialize
this
reference
D& d;
^</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>