[gdbsupport] Use using instead of typedef in next_iterator

Use using instead of typedef in next_iterator.  While we're at it, do the same
in basic_safe_iterator.

Suggested-By: Simon Marchi <simon.marchi@polymtl.ca>
Co-Authored-By: Simon Marchi <simon.marchi@polymtl.ca>
This commit is contained in:
Tom de Vries 2026-06-09 14:37:16 +02:00
parent 8aa13e4e29
commit 1eed06ae51
2 changed files with 12 additions and 12 deletions

View file

@ -28,12 +28,12 @@
template<typename T>
struct next_iterator
{
typedef next_iterator self_type;
typedef T *value_type;
typedef T *&reference;
typedef T **pointer;
typedef std::forward_iterator_tag iterator_category;
typedef int difference_type;
using self_type = next_iterator;
using value_type = T *;
using reference = T *&;
using pointer = T **;
using iterator_category = std::forward_iterator_tag;
using difference_type = int;
explicit next_iterator (T *item)
: m_item (item)

View file

@ -43,12 +43,12 @@ template<typename Iterator>
class basic_safe_iterator
{
public:
typedef basic_safe_iterator self_type;
typedef typename Iterator::value_type value_type;
typedef typename Iterator::reference reference;
typedef typename Iterator::pointer pointer;
typedef typename Iterator::iterator_category iterator_category;
typedef typename Iterator::difference_type difference_type;
using self_type = basic_safe_iterator;
using value_type = typename Iterator::value_type;
using reference = typename Iterator::reference;
using pointer = typename Iterator::pointer;
using iterator_category = typename Iterator::iterator_category;
using difference_type = typename Iterator::difference_type;
/* Construct the iterator using the underlying iterator BEGIN; the end
iterator is default constructed. */