mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 04:24:43 +00:00
gdbsupport: remove variadicity from filtered_iterator constructor
For the same reason as the previous patches (making things easier to understand, at the cost of being more explicit), remove filtered_iterator's variadic constructor, forcing the callers to pass already built underlying iterators. Change-Id: I1a9b6d43f3f087579b61b90b6f8f4128d66e19a1 Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
@@ -37,18 +37,19 @@ public:
|
||||
using difference_type
|
||||
= typename std::iterator_traits<BaseIterator>::difference_type;
|
||||
|
||||
/* Construct by forwarding all arguments to the underlying
|
||||
iterator. */
|
||||
template<typename... Args>
|
||||
explicit filtered_iterator (Args &&...args)
|
||||
: m_it (std::forward<Args> (args)...)
|
||||
{ skip_filtered (); }
|
||||
/* Construct by providing the begin underlying iterators. The end iterator
|
||||
is default-constructed. */
|
||||
filtered_iterator (BaseIterator begin)
|
||||
: filtered_iterator (std::move (begin), BaseIterator {})
|
||||
{}
|
||||
|
||||
/* Construct by providing begin and end underlying iterators. */
|
||||
filtered_iterator (BaseIterator begin, BaseIterator end)
|
||||
: m_it (std::move (begin)), m_end (std::move (end))
|
||||
{ skip_filtered (); }
|
||||
|
||||
/* Create a one-past-end iterator. */
|
||||
/* Create a one-past-end iterator. The underlying end iterator is obtained
|
||||
by default-constructing. */
|
||||
filtered_iterator () = default;
|
||||
|
||||
/* Need these as the variadic constructor would be a better match
|
||||
|
||||
Reference in New Issue
Block a user