[committed] libstdc++: Simplify nullary _Flat_set_impl::_M_try_emplace overload

Tomasz Kamiński tkaminsk@redhat.com
Mon Aug 31 11:32:39 GMT 2026


From: Patrick Palka <ppalka@redhat.com>

Remove the unused template parameter pack _Args (which always gets
deduced to an empty pack).

libstdc++-v3/ChangeLog:

	* include/std/flat_set (_Flat_set_impl::_M_try_emplace):
	Turn nullary overload into a non-template.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
---
This was approved on forge here:
https://forge.sourceware.org/gcc/gcc/pulls/189/commits/e20d1cf71ba448ad31d32989e68dfecf471a364f

Pushed  to trunk. Tested on x86_64-linux.

 libstdc++-v3/include/std/flat_set | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/libstdc++-v3/include/std/flat_set b/libstdc++-v3/include/std/flat_set
index 31dce48bbe0..98a08cf0672 100644
--- a/libstdc++-v3/include/std/flat_set
+++ b/libstdc++-v3/include/std/flat_set
@@ -485,11 +485,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	  return {__it, true};
 	}
 
-      template<typename... _Args>
-	_GLIBCXX26_CONSTEXPR
-	pair<iterator, bool>
-	_M_try_emplace(optional<const_iterator> __hint)
-	{ return _M_try_emplace(__hint, value_type()); }
+      _GLIBCXX26_CONSTEXPR
+      pair<iterator, bool>
+      _M_try_emplace(optional<const_iterator> __hint)
+      { return _M_try_emplace(__hint, value_type()); }
 
       template<typename... _Args>
 	requires is_constructible_v<value_type, _Args...>
-- 
2.55.0



More information about the Libstdc++ mailing list