This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/65861] libstdc++ is silently generating wrong code when its std::search is given an input iterator


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65861

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jack Howarth from comment #3)
> Is the use of _GLIBCXX_CONCEPT_CHECKS well enough advertised in the
> documentation that we can expect the average developer to know to invoke it?

It's documented three times! :-)

https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html
https://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_compile_checks.html
https://gcc.gnu.org/onlinedocs/libstdc++/manual/concept_checking.html

(In reply to Jack Howarth from comment #4)
> Also, is there a simple fix to the test case which avoids the user error or
> does the code have to be rewritten in a major way.

Don't try to std::search in a streambuf, copy the data elsewhere and search in
the copy.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]