---
name: "std::filesystem::path::iterator"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/std::filesystem::path::iterator"
---

# std::filesystem::path::iterator(3)

An iterator for the components of a path.

## NAME

std::filesystem::path::iterator - An iterator for the components of a path.

## SYNOPSIS

\#include \<filesystem\>

### Public Types

using **difference\_type**\
 using **iterator\_category**\
 using **pointer**\
 using **reference**\
 using **value\_type**\

### Public Member Functions

**iterator** (const iterator &)=default\
 reference **operator\*** () const noexcept\
 iterator & **operator++** () noexcept\
 iterator **operator++** (int) noexcept\
 iterator & **operator--** () noexcept\
 iterator **operator--** (int) noexcept\
 pointer **operator-\>** () const noexcept\
 iterator & **operator=** (const iterator &)=default\

### Friends

void **\_\_path\_iter\_advance** (iterator &\_\_i, difference\_type \_\_n) noexcept\
 difference\_type **\_\_path\_iter\_distance** (const iterator &\_\_first, const iterator &\_\_last) noexcept\
 bool **operator!=** (const iterator &\_\_lhs, const iterator &\_\_rhs) noexcept\
 bool **operator==** (const iterator &\_\_lhs, const iterator &\_\_rhs) noexcept\
 class **path**\

## Detailed Description

An iterator for the components of a path.

**Since**

C++17

## Author

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