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: unassignedclangb...@nondot.org Reporter: h...@chromium.org CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com, mc...@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.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs