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

libstdc++: Fix use of make_pair that used ADL

_Rb_tree::_M_equal_range calls make_pair unqualified, which means it
uses ADL. As the new testcase shows, this can find something other than
std::make_pair. Rather than just changing it to use a qualified call,
remove the use of make_pair entirely. We don't need to deduce any types
here, we know exactly what type of std::pair we want to construct, so do
that explicitly.

libstdc++-v3/ChangeLog:

	* include/bits/stl_tree.h (_Rb_tree::_M_equal_range): Replace
	unqualified call to make_pair with explicit construction of
	std::pair.
	* testsuite/23_containers/set/operations/equal_range_adl.cc:
	New test.
parent 5ced9175
No related branches found
No related tags found
Loading
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