[llvm-bugs] [Bug 30303] New: error: no matching function for call to '__ptr_in_range'
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 6 16:19:14 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30303
Bug ID: 30303
Summary: error: no matching function for call to
'__ptr_in_range'
Product: libc++
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: hans at chromium.org
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com,
mclow at qti.qualcomm.com
Classification: Unclassified
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 Bug 30240 - 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.
------------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160906/2ff99c63/attachment.html>
More information about the llvm-bugs
mailing list