]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdbsupport: make reference_to_pointer_iterator's constructor non-variadic
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 3 Sep 2025 14:50:05 +0000 (10:50 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 7 Oct 2025 20:22:15 +0000 (16:22 -0400)
For the same reason as the previous patches (making things easier to
understand, at the cost of being more explicit), change
reference_to_pointer_iterator's constructor to take an already built
underlying iterator.

There are no uses of this utility in the code base right now, so no
callers to update.

Change-Id: Ifadb4c3a5ee53a8d0eb6c0d79efcc92271492e8e
Approved-By: Tom Tromey <tom@tromey.com>
gdbsupport/reference-to-pointer-iterator.h

index af58e38bad23d74beec15d84f8898fc9bd6504e8..67a8d5473d79f8181d6cb7497b4dad2427d0ebdf 100644 (file)
@@ -38,9 +38,8 @@ struct reference_to_pointer_iterator
 
   /* Construct a reference_to_pointer_iterator, passing args to the underlying
      iterator.  */
-  template <typename... Args>
-  reference_to_pointer_iterator (Args &&...args)
-    : m_it (std::forward<Args> (args)...)
+  explicit reference_to_pointer_iterator (IteratorType it)
+    : m_it (std::move (it))
   {}
 
   /* Create a past-the-end iterator.