<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - An R-value to L-value reference binding in a templated constructor"
href="https://bugs.llvm.org/show_bug.cgi?id=35034">35034</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>An R-value to L-value reference binding in a templated constructor
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>poltavsky.alexandr@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>A really nasty bug:
template<typename T>
struct data {
template<typename U>
data( U && value ) : _value{ T( std::forward<U>( value ) ) } {}
T _value;
};
data< int& > d{ 10 }; //okay on Clang, not okay on GCC & MSVC
<a href="https://godbolt.org/g/TrgJCp">https://godbolt.org/g/TrgJCp</a>
The initial intent for the code was to avoid strict init rules for uniform
initialization in a converting constructor.</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>