https://llvm.org/bugs/show_bug.cgi?id=23307
Richard Smith <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |INVALID --- Comment #4 from Richard Smith <[email protected]> --- 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.
_______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
