[LLVMbugs] [Bug 23307] clang fails to compile rstudio-0.98.1103/src/cpp/session/modules/SessionHTMLPreview.cpp against libc++
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 22 19:26:06 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23307
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |richard-llvm at metafoo.co.uk
Resolution|--- |INVALID
--- Comment #4 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Reduced self-contained testcase:
#include <string>
#include <iterator>
#include <algorithm>
void f(std::istream &s, std::string x) {
std::istreambuf_iterator<char> eod;
std::search(std::istreambuf_iterator<char>(s),
eod,
x.begin(),
x.end());
}
Fails with libc++, passes with libstdc++, fails with libstdc++ and
-D_GLIBCXX_CONCEPT_CHECKS (which makes it actually check that std::search is
not being abused in this way).
FWIW, libstdc++ is silently generating wrong code when its std::search is given
an input iterator (it assumes it can save the iterator position and backtrack).
--
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/20150423/942c9c38/attachment.html>
More information about the llvm-bugs
mailing list