<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - error: no matching function for call to '__ptr_in_range'"
href="https://llvm.org/bugs/show_bug.cgi?id=30303">30303</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>error: no matching function for call to '__ptr_in_range'
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hans@chromium.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com, mclow@qti.qualcomm.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The following code used to compile, but now fails as below. This is reduced
from some code in Chromium.
#include <string>
#include <vector>
#include <cstdint>
using namespace std;
void f(string &s, vector<uint8_t> &v) {
s.append(v.begin(), v.end());
}
In file included from /tmp/a.cc:1:
/work/llvm/build.release/bin/../include/c++/v1/string:2180:14: error: no
matching function for call to '__ptr_in_range'
if ( __ptr_in_range(&*__first, data(), data() + size()))
^~~~~~~~~~~~~~
/tmp/a.cc:7:5: note: in instantiation of function template specialization
'std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >::append<std::__1::__wrap_iter<unsigned char *> >'
requested here
s.append(v.begin(), v.end());
^
/work/llvm/build.release/bin/../include/c++/v1/string:2160:6: note: candidate
template ignored: deduced conflicting types for parameter '_Tp' ('unsigned
char' vs. 'char')
bool __ptr_in_range (const _Tp* __p, const _Tp* __first, const _Tp* __last)
^
1 error generated.
I believe this is due to:
------------------------------------------------------------------------
r280643 | marshall | 2016-09-04 18:54:30 -0700 (Sun, 04 Sep 2016) | 1 line
Fix <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - std::string: append(first, last) error when aliasing"
href="show_bug.cgi?id=30240">Bug 30240</a> - std::string: append(first, last) error when aliasing. Add test
cases for append/insert/assign/replace while we're at it, and fix a similar bug
in insert.
------------------------------------------------------------------------</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>