From 4c4df7a12174e1e28327a32b9b24d90f7da89ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Michal?= Date: Sun, 4 Jan 2026 02:49:47 +0100 Subject: [PATCH 01/13] Remove redundant overloads of _Flap_map_base::_Lower_bound, _Upper_bound, _Equal_range and _Find --- stl/inc/flat_map | 91 +++++++++++------------------------------------- 1 file changed, 21 insertions(+), 70 deletions(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index 1e6eac4961b..fd061ed5f7a 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -1100,24 +1100,13 @@ private: } template - _NODISCARD iterator _Find(const _KeyTy& _Key_val) { + _NODISCARD auto _Find(this auto& _Self, const _KeyTy& _Key_val) { _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - iterator _Position = lower_bound(_Key_val); - if (_Position != end() && !_Key_compare(_Key_val, _Position->first)) { + const auto _Position = _Self.lower_bound(_Key_val); + if (_Position != _Self.end() && !_Self._Key_compare(_Key_val, _Position->first)) { return _Position; } else { - return end(); - } - } - - template - _NODISCARD const_iterator _Find(const _KeyTy& _Key_val) const { - _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - const_iterator _Position = lower_bound(_Key_val); - if (_Position != cend() && !_Key_compare(_Key_val, _Position->first)) { - return _Position; - } else { - return cend(); + return _Self.end(); } } @@ -1133,74 +1122,36 @@ private: return find(_Key_val) != cend(); } - template - _NODISCARD iterator _Lower_bound(const _KeyTy& _Key_val) { - _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - const auto _Key_unchecked_begin = _STD _Get_unwrapped(_STD cbegin(_Data.keys)); - const auto _Key_unchecked_it = _STD lower_bound( - _Key_unchecked_begin, _STD _Get_unwrapped(_STD cend(_Data.keys)), _Key_val, _Pass_key_comp()); - const auto _Dist = _Key_unchecked_it - _Key_unchecked_begin; - - auto _Key_it = _STD cbegin(_Data.keys); - _STD _Seek_wrapped(_Key_it, _Key_unchecked_it); - auto _Val_it = _Data.values.begin() + static_cast<_RANGES range_difference_t<_MappedContainer>>(_Dist); - return iterator{_STD move(_Key_it), _STD move(_Val_it)}; - } - - template - _NODISCARD const_iterator _Lower_bound(const _KeyTy& _Key_val) const { + template + _NODISCARD auto _Find_bound(this _SelfTy& _Self, const _KeyTy& _Key_val, _BoundFn&& _Bound_fun) { _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - const auto _Key_unchecked_begin = _STD _Get_unwrapped(_STD cbegin(_Data.keys)); - const auto _Key_unchecked_it = _STD lower_bound( - _Key_unchecked_begin, _STD _Get_unwrapped(_STD cend(_Data.keys)), _Key_val, _Pass_key_comp()); + const auto _Key_unchecked_begin = _STD _Get_unwrapped(_STD cbegin(_Self._Data.keys)); + const auto _Key_unchecked_it = _Bound_fun( + _Key_unchecked_begin, _STD _Get_unwrapped(_STD cend(_Self._Data.keys)), _Key_val, _Self._Pass_key_comp()); const auto _Dist = _Key_unchecked_it - _Key_unchecked_begin; - auto _Key_it = _STD cbegin(_Data.keys); + auto _Key_it = _STD cbegin(_Self._Data.keys); _STD _Seek_wrapped(_Key_it, _Key_unchecked_it); - auto _Val_it = - _STD cbegin(_Data.values) + static_cast<_RANGES range_difference_t>(_Dist); - return const_iterator{_STD move(_Key_it), _STD move(_Val_it)}; - } - - template - _NODISCARD iterator _Upper_bound(const _KeyTy& _Key_val) { - _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - const auto _Key_unchecked_begin = _STD _Get_unwrapped(_STD cbegin(_Data.keys)); - const auto _Key_unchecked_it = _STD upper_bound( - _Key_unchecked_begin, _STD _Get_unwrapped(_STD cend(_Data.keys)), _Key_val, _Pass_key_comp()); - const auto _Dist = _Key_unchecked_it - _Key_unchecked_begin; + auto _Val_it = _Self._Data.values.begin() + static_cast<_RANGES range_difference_t<_MappedContainer>>(_Dist); - auto _Key_it = _STD cbegin(_Data.keys); - _STD _Seek_wrapped(_Key_it, _Key_unchecked_it); - auto _Val_it = _Data.values.begin() + static_cast<_RANGES range_difference_t<_MappedContainer>>(_Dist); - return iterator{_STD move(_Key_it), _STD move(_Val_it)}; + using return_type = _STD conditional_t<_STD is_const_v<_SelfTy>, const_iterator, iterator>; + return return_type{_STD move(_Key_it), _STD move(_Val_it)}; } - template - _NODISCARD const_iterator _Upper_bound(const _KeyTy& _Key_val) const { - _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - const auto _Key_unchecked_begin = _STD _Get_unwrapped(_STD cbegin(_Data.keys)); - const auto _Key_unchecked_it = _STD upper_bound( - _Key_unchecked_begin, _STD _Get_unwrapped(_STD cend(_Data.keys)), _Key_val, _Pass_key_comp()); - const auto _Dist = _Key_unchecked_it - _Key_unchecked_begin; - - auto _Key_it = _STD cbegin(_Data.keys); - _STD _Seek_wrapped(_Key_it, _Key_unchecked_it); - auto _Val_it = - _STD cbegin(_Data.values) + static_cast<_RANGES range_difference_t>(_Dist); - return const_iterator{_STD move(_Key_it), _STD move(_Val_it)}; + template + _NODISCARD auto _Lower_bound(this _SelfTy& _Self, const _KeyTy& _Key_val) { + return _Self._Find_bound(_Key_val, _RANGES lower_bound); } - template - _NODISCARD pair _Equal_range(const _KeyTy& _Key_val) { - _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - return {lower_bound(_Key_val), upper_bound(_Key_val)}; + template + _NODISCARD auto _Upper_bound(this _SelfTy& _Self, const _KeyTy& _Key_val) { + return _Self._Find_bound(_Key_val, _RANGES upper_bound); } template - _NODISCARD pair _Equal_range(const _KeyTy& _Key_val) const { + _NODISCARD auto _Equal_range(this auto& _Self, const _KeyTy& _Key_val) { _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - return {lower_bound(_Key_val), upper_bound(_Key_val)}; + return _STD make_pair(_Self.lower_bound(_Key_val), _Self.upper_bound(_Key_val)); } }; From ba65878336e0661b76eca0501686a665e8681610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Michal?= Date: Sun, 4 Jan 2026 03:09:10 +0100 Subject: [PATCH 02/13] Fix formatting and ref qualifiers on deduced this. --- stl/inc/flat_map | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index fd061ed5f7a..fac3fa3794f 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -1123,10 +1123,10 @@ private: } template - _NODISCARD auto _Find_bound(this _SelfTy& _Self, const _KeyTy& _Key_val, _BoundFn&& _Bound_fun) { + _NODISCARD auto _Find_bound(this _SelfTy& _Self, const _KeyTy& _Key_val, _BoundFn _Bound_fun) { _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); const auto _Key_unchecked_begin = _STD _Get_unwrapped(_STD cbegin(_Self._Data.keys)); - const auto _Key_unchecked_it = _Bound_fun( + const auto _Key_unchecked_it = _Bound_fun( _Key_unchecked_begin, _STD _Get_unwrapped(_STD cend(_Self._Data.keys)), _Key_val, _Self._Pass_key_comp()); const auto _Dist = _Key_unchecked_it - _Key_unchecked_begin; @@ -1134,7 +1134,8 @@ private: _STD _Seek_wrapped(_Key_it, _Key_unchecked_it); auto _Val_it = _Self._Data.values.begin() + static_cast<_RANGES range_difference_t<_MappedContainer>>(_Dist); - using return_type = _STD conditional_t<_STD is_const_v<_SelfTy>, const_iterator, iterator>; + using return_type = + _STD conditional_t<_STD is_const_v<_STD remove_reference_t<_SelfTy>>, const_iterator, iterator>; return return_type{_STD move(_Key_it), _STD move(_Val_it)}; } From 88ff284c627b094145fb77ac2f548e4488b7cf0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Michal?= Date: Sun, 4 Jan 2026 12:19:12 +0100 Subject: [PATCH 03/13] Use _STD begin instead of member begin. --- stl/inc/flat_map | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index fac3fa3794f..46f0bef8184 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -1132,7 +1132,8 @@ private: auto _Key_it = _STD cbegin(_Self._Data.keys); _STD _Seek_wrapped(_Key_it, _Key_unchecked_it); - auto _Val_it = _Self._Data.values.begin() + static_cast<_RANGES range_difference_t<_MappedContainer>>(_Dist); + auto _Val_it = + _STD begin(_Self._Data.values) + static_cast<_RANGES range_difference_t>(_Dist); using return_type = _STD conditional_t<_STD is_const_v<_STD remove_reference_t<_SelfTy>>, const_iterator, iterator>; From 733086c56573773eb02f5781cf377b7e40065ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Michal?= Date: Sun, 4 Jan 2026 12:31:49 +0100 Subject: [PATCH 04/13] Add tests to verify changes cause no regression. --- tests/std/tests/P0429R9_flat_map/test.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/std/tests/P0429R9_flat_map/test.cpp b/tests/std/tests/P0429R9_flat_map/test.cpp index 74e88ddc81d..fbff83b9afd 100644 --- a/tests/std/tests/P0429R9_flat_map/test.cpp +++ b/tests/std/tests/P0429R9_flat_map/test.cpp @@ -766,6 +766,20 @@ void test_throwing_compare_swap() { test_throwing_compare_swap_single(); } +// Test that changes in GH-5987 did not break calls of lookup member functions by using deduced this. +template +void test_lookup_call_on_temporaries_single() { + (void) T{}.lower_bound(42); + (void) T{}.upper_bound(42); + (void) T{}.equal_range(42); + (void) T{}.find(42); +} + +void test_lookup_call_on_temporaries() { + test_lookup_call_on_temporaries_single>(); + test_lookup_call_on_temporaries_single>(); +} + int main() { test_construction(); test_pointer_to_incomplete_type(); @@ -776,4 +790,5 @@ int main() { test_insert_or_assign(); test_comparison(); test_throwing_compare_swap(); + test_lookup_call_on_temporaries(); } From 7b6cd28c60c2e0b1970a729804215a149a584100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Michal?= Date: Sun, 4 Jan 2026 14:53:52 +0100 Subject: [PATCH 05/13] Also test heterogeneous lookup. Remove std:: qualifications from tests --- tests/std/tests/P0429R9_flat_map/test.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/std/tests/P0429R9_flat_map/test.cpp b/tests/std/tests/P0429R9_flat_map/test.cpp index fbff83b9afd..521af97aa09 100644 --- a/tests/std/tests/P0429R9_flat_map/test.cpp +++ b/tests/std/tests/P0429R9_flat_map/test.cpp @@ -770,14 +770,18 @@ void test_throwing_compare_swap() { template void test_lookup_call_on_temporaries_single() { (void) T{}.lower_bound(42); + (void) T{}.lower_bound('a'); (void) T{}.upper_bound(42); + (void) T{}.upper_bound('a'); (void) T{}.equal_range(42); + (void) T{}.equal_range('a'); (void) T{}.find(42); + (void) T{}.find('a'); } void test_lookup_call_on_temporaries() { - test_lookup_call_on_temporaries_single>(); - test_lookup_call_on_temporaries_single>(); + test_lookup_call_on_temporaries_single>(); + test_lookup_call_on_temporaries_single>(); } int main() { From 3658ec23b8ad28d7d99b933cdce301b002c1b3f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Michal?= Date: Sun, 4 Jan 2026 14:55:26 +0100 Subject: [PATCH 06/13] Simplify flat_map::_At by deducing this. --- stl/inc/flat_map | 17 +++-------------- tests/std/tests/P0429R9_flat_map/test.cpp | 5 +++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index 46f0bef8184..322565012ca 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -1353,21 +1353,10 @@ private: using _Mybase::_Pass_key_comp; template - _NODISCARD mapped_type& _At(const _KeyTy& _Key_val) { + _NODISCARD auto& _At(this auto& _Self, const _KeyTy& _Key_val) { _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - const auto _Position = this->find(_Key_val); - if (_Position == this->end()) { - _Xout_of_range("invalid flat_map key"); - } - - return _Position->second; - } - - template - _NODISCARD const mapped_type& _At(const _KeyTy& _Key_val) const { - _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - const auto _Position = this->find(_Key_val); - if (_Position == this->end()) { + const auto _Position = _Self.find(_Key_val); + if (_Position == _Self.end()) { _Xout_of_range("invalid flat_map key"); } diff --git a/tests/std/tests/P0429R9_flat_map/test.cpp b/tests/std/tests/P0429R9_flat_map/test.cpp index 521af97aa09..2739d676be3 100644 --- a/tests/std/tests/P0429R9_flat_map/test.cpp +++ b/tests/std/tests/P0429R9_flat_map/test.cpp @@ -782,6 +782,11 @@ void test_lookup_call_on_temporaries_single() { void test_lookup_call_on_temporaries() { test_lookup_call_on_temporaries_single>(); test_lookup_call_on_temporaries_single>(); + try { + (void) flat_map{}.at(42); + (void) flat_map{}.at('a'); + } catch (...) { + } } int main() { From afa3d25d4a9632dd7d728f670d80c6da4519ffef Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 5 Jan 2026 06:14:35 -0800 Subject: [PATCH 07/13] Uglify: `return_type` => `_Maybe_const_iter` --- stl/inc/flat_map | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index 322565012ca..c244c7ba062 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -1135,9 +1135,9 @@ private: auto _Val_it = _STD begin(_Self._Data.values) + static_cast<_RANGES range_difference_t>(_Dist); - using return_type = + using _Maybe_const_iter = _STD conditional_t<_STD is_const_v<_STD remove_reference_t<_SelfTy>>, const_iterator, iterator>; - return return_type{_STD move(_Key_it), _STD move(_Val_it)}; + return _Maybe_const_iter{_STD move(_Key_it), _STD move(_Val_it)}; } template From cc50bf73b412e2c116d59b58a7dab8949d9bedc4 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 5 Jan 2026 06:16:41 -0800 Subject: [PATCH 08/13] Drop `_STD` for type aliases and variable templates. --- stl/inc/flat_map | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index c244c7ba062..dc8327d1833 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -1135,8 +1135,7 @@ private: auto _Val_it = _STD begin(_Self._Data.values) + static_cast<_RANGES range_difference_t>(_Dist); - using _Maybe_const_iter = - _STD conditional_t<_STD is_const_v<_STD remove_reference_t<_SelfTy>>, const_iterator, iterator>; + using _Maybe_const_iter = conditional_t>, const_iterator, iterator>; return _Maybe_const_iter{_STD move(_Key_it), _STD move(_Val_it)}; } From 79787eb6e4bfb87209f8c3b7bdbf5a080d46b0e9 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 5 Jan 2026 06:22:35 -0800 Subject: [PATCH 09/13] All shall love CTAD and despair. --- stl/inc/flat_map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index dc8327d1833..ef6c70cc577 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -1152,7 +1152,7 @@ private: template _NODISCARD auto _Equal_range(this auto& _Self, const _KeyTy& _Key_val) { _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); - return _STD make_pair(_Self.lower_bound(_Key_val), _Self.upper_bound(_Key_val)); + return pair{_Self.lower_bound(_Key_val), _Self.upper_bound(_Key_val)}; } }; From 6d42f4eb84c0a58413815abdf7f452fb6608699a Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 5 Jan 2026 07:27:26 -0800 Subject: [PATCH 10/13] Template param order should follow function param order. --- stl/inc/flat_map | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index ef6c70cc577..f88eaed1dae 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -1122,7 +1122,7 @@ private: return find(_Key_val) != cend(); } - template + template _NODISCARD auto _Find_bound(this _SelfTy& _Self, const _KeyTy& _Key_val, _BoundFn _Bound_fun) { _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); const auto _Key_unchecked_begin = _STD _Get_unwrapped(_STD cbegin(_Self._Data.keys)); @@ -1139,12 +1139,12 @@ private: return _Maybe_const_iter{_STD move(_Key_it), _STD move(_Val_it)}; } - template + template _NODISCARD auto _Lower_bound(this _SelfTy& _Self, const _KeyTy& _Key_val) { return _Self._Find_bound(_Key_val, _RANGES lower_bound); } - template + template _NODISCARD auto _Upper_bound(this _SelfTy& _Self, const _KeyTy& _Key_val) { return _Self._Find_bound(_Key_val, _RANGES upper_bound); } From edc275099a5a858b8e960edbb3a150fa9d3df9f2 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 5 Jan 2026 07:29:16 -0800 Subject: [PATCH 11/13] Avoid abbreviated function templates. --- stl/inc/flat_map | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index f88eaed1dae..e3d4cbedaea 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -1099,8 +1099,8 @@ private: return _Count; } - template - _NODISCARD auto _Find(this auto& _Self, const _KeyTy& _Key_val) { + template + _NODISCARD auto _Find(this _SelfTy& _Self, const _KeyTy& _Key_val) { _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); const auto _Position = _Self.lower_bound(_Key_val); if (_Position != _Self.end() && !_Self._Key_compare(_Key_val, _Position->first)) { @@ -1149,8 +1149,8 @@ private: return _Self._Find_bound(_Key_val, _RANGES upper_bound); } - template - _NODISCARD auto _Equal_range(this auto& _Self, const _KeyTy& _Key_val) { + template + _NODISCARD auto _Equal_range(this _SelfTy& _Self, const _KeyTy& _Key_val) { _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); return pair{_Self.lower_bound(_Key_val), _Self.upper_bound(_Key_val)}; } @@ -1351,8 +1351,8 @@ private: using _Mybase::_Key_equal; using _Mybase::_Pass_key_comp; - template - _NODISCARD auto& _At(this auto& _Self, const _KeyTy& _Key_val) { + template + _NODISCARD auto& _At(this _SelfTy& _Self, const _KeyTy& _Key_val) { _STL_INTERNAL_STATIC_ASSERT(is_same_v<_KeyTy, key_type> || _Transparent); const auto _Position = _Self.find(_Key_val); if (_Position == _Self.end()) { From 7930df078933944386310032793a1b40f71126bf Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 5 Jan 2026 07:36:58 -0800 Subject: [PATCH 12/13] We don't need `remove_reference_t` for `_SelfTy`. --- stl/inc/flat_map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index e3d4cbedaea..d50232d3b1e 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -1135,7 +1135,7 @@ private: auto _Val_it = _STD begin(_Self._Data.values) + static_cast<_RANGES range_difference_t>(_Dist); - using _Maybe_const_iter = conditional_t>, const_iterator, iterator>; + using _Maybe_const_iter = conditional_t, const_iterator, iterator>; return _Maybe_const_iter{_STD move(_Key_it), _STD move(_Val_it)}; } From 8aa78fc7de66973a534202be938ffb0121f5ad9d Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Mon, 5 Jan 2026 07:44:39 -0800 Subject: [PATCH 13/13] Comment: "deduced this" => "deducing this" --- tests/std/tests/P0429R9_flat_map/test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/std/tests/P0429R9_flat_map/test.cpp b/tests/std/tests/P0429R9_flat_map/test.cpp index 2739d676be3..fac98c6ff64 100644 --- a/tests/std/tests/P0429R9_flat_map/test.cpp +++ b/tests/std/tests/P0429R9_flat_map/test.cpp @@ -766,7 +766,7 @@ void test_throwing_compare_swap() { test_throwing_compare_swap_single(); } -// Test that changes in GH-5987 did not break calls of lookup member functions by using deduced this. +// Test that changes in GH-5987 did not break calls of lookup member functions by using deducing this. template void test_lookup_call_on_temporaries_single() { (void) T{}.lower_bound(42);