Skip to content
Snippets Groups Projects
Unverified Commit ce34fcc5 authored by Jonathan Wakely's avatar Jonathan Wakely Committed by Jonathan Wakely
Browse files

libstdc++: Fix std::find for non-contiguous iterators [PR115799]

The r15-1857 change didn't correctly restrict the new optimization to
contiguous iterators.

libstdc++-v3/ChangeLog:

	PR libstdc++/115799
	* include/bits/stl_algo.h (find): Use 'if constexpr' so that
	memchr optimization is a discarded statement for non-contiguous
	iterators.
	* testsuite/25_algorithms/find/bytes.cc: Check with input
	iterators.
parent 762ee55d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment