---
name: "std::filesystem_path_iterator"
section: "3cxx"
platform: "linux"
package: "libstdc++-11-doc"
version: "11.3.0-12"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/std::filesystem_path_iterator"
---

# std::filesystem\_path\_iterator(3cxx)

An iterator for the components of a path.

## NAME

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

## SYNOPSIS

`#include <fs_path.h>`

### Public Types

using **difference\_type** = std::ptrdiff\_t\
 using **iterator\_category** = **std::bidirectional\_iterator\_tag**\
 using **pointer** = const **path** \*\
 using **reference** = const **path** &\
 using **value\_type** = **path**\

### Public Member Functions

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

### Friends

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

## Detailed Description

An iterator for the components of a path.

Definition at line **873** of file **bits/fs\_path.h**.

## Member Typedef Documentation

### using std::filesystem::path::iterator::difference\_type = std::ptrdiff\_t

Definition at line **876** of file **bits/fs\_path.h**.

### using std::filesystem::path::iterator::iterator\_category = std::bidirectional\_iterator\_tag

Definition at line **880** of file **bits/fs\_path.h**.

### using std::filesystem::path::iterator::pointer = const path\*

Definition at line **879** of file **bits/fs\_path.h**.

### using std::filesystem::path::iterator::reference = const path&

Definition at line **878** of file **bits/fs\_path.h**.

### using std::filesystem::path::iterator::value\_type = path

Definition at line **877** of file **bits/fs\_path.h**.

## Constructor & Destructor Documentation

### std::filesystem::path::iterator::iterator ()` [inline]`

Definition at line **882** of file **bits/fs\_path.h**.

## Member Function Documentation

### iterator std::filesystem::path::iterator::operator++ (int)` [inline]`

Definition at line **891** of file **bits/fs\_path.h**.

### iterator std::filesystem::path::iterator::operator-- (int)` [inline]`

Definition at line **894** of file **bits/fs\_path.h**.

### pointer std::filesystem::path::iterator::operator-\> () const` [inline]`

Definition at line **888** of file **bits/fs\_path.h**.

## Friends And Related Function Documentation

### void \_\_path\_iter\_advance (iterator & \_\_i, difference\_type \_\_n)` [friend]`

Definition at line **921** of file **bits/fs\_path.h**.

### difference\_type \_\_path\_iter\_distance (const iterator & \_\_first, const iterator & \_\_last)` [friend]`

Definition at line **908** of file **bits/fs\_path.h**.

### bool operator!= (const iterator & \_\_lhs, const iterator & \_\_rhs)` [friend]`

Definition at line **899** of file **bits/fs\_path.h**.

### bool operator== (const iterator & \_\_lhs, const iterator & \_\_rhs)` [friend]`

Definition at line **896** of file **bits/fs\_path.h**.

### friend class path` [friend]`

Definition at line **903** of file **bits/fs\_path.h**.

## Author

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