---
name: "std::List_iterator"
section: "3"
platform: "linux"
package: "libstdc++5-3.3-doc"
version: "1:3.3.6-15"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/std::List_iterator"
---

# std::List\_iterator(3)

A list::iterator.

## NAME

std::List\_iterator - A **list::iterator**.

## SYNOPSIS

`#include <list>`

Inherits **std::List\_iterator\_base**.

### Public Types

typedef **List\_iterator**\< Type, Type &, Type \* \> **iterator**\
 typedef **List\_iterator**\< Type, const Type &, const Type \* \> **const\_iterator**\
 typedef **List\_iterator**\< Type, Ref, Ptr \> **Self**\
 typedef Type **value\_type**\
 typedef Ptr **pointer**\
 typedef Ref **reference**\
 typedef **List\_node**\< Type \> **Node**\
 typedef size\_t **size\_type**\
 typedef ptrdiff\_t **difference\_type**\
 typedef **bidirectional\_iterator\_tag** **iterator\_category**\

### Public Member Functions

**List\_iterator** (**Node** \*x)\
 **List\_iterator** ()\
 **List\_iterator** (const **iterator** &x)\
 **reference** **operator \*** () const\
 **pointer** **operator-\>** () const\
 **Self** & **operator++** ()\
 **Self** **operator++** (int)\
 **Self** & **operator--** ()\
 **Self** **operator--** (int)\
 void **M\_incr** ()\
 *Walk the list forward.*  void **M\_decr** ()\
 *Walk the list backward.*  bool **operator==** (const **List\_iterator\_base** &x) const\
 bool **operator!=** (const **List\_iterator\_base** &x) const\

### Public Attributes

**List\_node\_base** \* **M\_node**\
 *The only member points to the list element.*

## Detailed Description

### template\<typename Type, typename Ref, typename Ptr\> struct std::List\_iterator\< Type, Ref, Ptr \>

A **list::iterator**.

In addition to being used externally, a list holds one of these internally, pointing to the sequence of data.

Definition at line 144 of file list.

## Member Function Documentation

### void std::List\_iterator\_base::M\_incr ()` [inline, inherited]`

Walk the list forward.

Definition at line 116 of file list.

### void std::List\_iterator\_base::M\_decr ()` [inline, inherited]`

Walk the list backward.

Definition at line 121 of file list.

## Member Data Documentation

### List\_node\_base\* std::List\_iterator\_base::M\_node` [inherited]`

The only member points to the list element.

Definition at line 104 of file list.

## Author

Generated automatically by Doxygen for libstdc++-v3 Source from the source code.
