<functional>
: boyer_moore_searcher
and boyer_moore_horspool_searcher
should accept ADL-incompatible element types
#4380
Labels
bug
Something isn't working
Describe the bug
The following program doesn't compile with MSVC STL due to ADL which attempts to complete a bad type.
After the changes in #4379, the bug of MSVC STL comes from allocator comparison and iterator operations in
unordered_map
which is internally used by both searchers.STL/stl/inc/functional
Line 2541 in 192a840
Command-line test case
Godbolt link.
Other standard library implementations seem to be buggy due to similar reasons.
Expected behavior
This example compiles.
STL version
Additional context
_STD
-qualification doesn't work for this case. We may need to change the type of theunordered_map
to avoid undesired ADL, which may be dangerous for ABI-compatibility.The text was updated successfully, but these errors were encountered: