From ca909e703495cb685c5894f7a8d9f945bd8eeb31 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 15 Jan 2026 15:30:15 -0800 Subject: [PATCH 1/3] Drop unnecessary `this->`. --- stl/inc/flat_map | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stl/inc/flat_map b/stl/inc/flat_map index 394fa0394ad..5b4c52c4676 100644 --- a/stl/inc/flat_map +++ b/stl/inc/flat_map @@ -902,19 +902,19 @@ protected: if constexpr (_IsUnique) { if (_Key_it != _Data.keys.begin() && !_Key_compare(*(_Key_it - 1), _STD forward<_OtherKey>(_Key_val))) { // Previous element is equivalent to key, no insert needed - return {this->begin() + (_Index - 1), false}; + return {begin() + (_Index - 1), false}; } } // Need to insert key_type _Key_to_insert(_STD forward<_OtherKey>(_Key_val)); mapped_type _Mapped_to_insert(_STD forward<_MappedArgTypes>(_Mapped_args)...); - _Insert_exact(this->cbegin() + _Index, _STD move(_Key_to_insert), _STD move(_Mapped_to_insert)); + _Insert_exact(cbegin() + _Index, _STD move(_Key_to_insert), _STD move(_Mapped_to_insert)); if constexpr (_IsUnique) { - return {this->begin() + _Index, true}; + return {begin() + _Index, true}; } else { - return this->begin() + _Index; + return begin() + _Index; } } @@ -986,7 +986,7 @@ protected: } } - const auto _Dist = _New_position - this->begin(); + const auto _Dist = _New_position - begin(); { key_type _Key_to_insert(_STD forward<_OtherKey>(_Key_val)); mapped_type _Mapped_to_insert(_STD forward<_MappedArgTypes>(_Args)...); @@ -1260,12 +1260,12 @@ public: mapped_type& operator[](const key_type& _Key_val) requires is_default_constructible_v { - return this->try_emplace(_Key_val).first->second; + return try_emplace(_Key_val).first->second; } mapped_type& operator[](key_type&& _Key_val) requires is_default_constructible_v { - return this->try_emplace(_STD move(_Key_val)).first->second; + return try_emplace(_STD move(_Key_val)).first->second; } template @@ -1273,7 +1273,7 @@ public: requires _Transparent && is_constructible_v && is_default_constructible_v { - return this->try_emplace(_STD forward<_OtherKey>(_Key_val)).first->second; + return try_emplace(_STD forward<_OtherKey>(_Key_val)).first->second; } _NODISCARD mapped_type& at(const key_type& _Key_val) { From 18611d0dc288ed428003ce6feee7de4104dc7596 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 15 Jan 2026 15:36:31 -0800 Subject: [PATCH 2/3] `typename` => `class` in tests. --- tests/std/tests/P0429R9_flat_map/test.cpp | 14 +++++++------- .../test.compile.pass.cpp | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/std/tests/P0429R9_flat_map/test.cpp b/tests/std/tests/P0429R9_flat_map/test.cpp index c7e0aba31d0..e2a4a9b8733 100644 --- a/tests/std/tests/P0429R9_flat_map/test.cpp +++ b/tests/std/tests/P0429R9_flat_map/test.cpp @@ -30,7 +30,7 @@ constexpr bool is_specialization_v = false; template