STD::FILESYSTEM_PATH_ITERATOR(3)
π
std::filesystem::path::iterator β from the libstdc++ manual, bestie
okay so picture this: you're deep in std::filesystem and you need to walk a path piece by piece, like component by component, and you're out here thinking "surely there's a whole iterator for that." There is. It lives in libstdc++ and it's literally called std::filesystem::path::iterator. An iterator for the components of a path. That's the whole vibe. π¦
β¨ NAME β¨
std::filesystem::path::iterator β an iterator for the components of a path. That's it. That's the gig. π
π SYNOPSIS π
πΈ Public Types
these are the type aliases it's serving, and you will respect them:
difference_typeβusing difference_type = std::ptrdiff_titerator_categoryβusing iterator_category = std::bidirectional_iterator_tag(so yes bestie, it goes both ways π)pointerβusing pointer = const path *referenceβusing reference = const path &value_typeβusing value_type = path
β Public Member Functions
every single one, no skipping, iykyk:
iterator (const iterator &)=defaultβ copy constructor, defaulted, doing exactly what it says on the tinreference operator* () constβ dereference it, get yourreferencebackiterator & operator++ ()β prefix increment, returns a reference to this iteratoriterator operator++ (int)β postfix increment, returns a copyiterator & operator-- ()β prefix decrement, same deal, returns a referenceiterator operator-- (int)β postfix decrement, returns a copypointer operator-> () constβ arrow operator, hands you apointeriterator & operator= (const iterator &)=defaultβ copy assignment, defaulted, slay
π«Ά Friends
these aren't just friends, they're friends-of-the-class 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
void __path_iter_advance (iterator &__i, difference_type __n)β advances__iby__ndifference_type __path_iter_distance (const iterator &__first, const iterator &__last)β the distance between__firstand__lastbool operator!= (const iterator &__lhs, const iterator &__rhs)β inequality check between two iteratorsbool operator== (const iterator &__lhs, const iterator &__rhs)β equality check between two iteratorsclass pathβ the class being friended, obviously, it's right there in the name of the whole thing π
π§ Detailed Description π§
An iterator for the components of a path. Fr fr. You point it at a path, you increment it, and it walks you through the components one at a time like it's reading your horoscope. Highkey iconic.
ngl there's not a ton more in this doc β what you see is what you get, and what you get is a bidirectional iterator over path components. no cap.
π₯ Author π₯
Generated automatically by Doxygen for libstdc++ from the source code. Not a human, not a vibe, just Doxygen doing its little thing. π
kisses bestie, this page was brought to you by libstdc++ and it was dated Wed Oct 7 2026 β go forth and iterate, mwah π
π¦ where this page comes from
- centos-stream 9: libstdc++-docs 11.5.0-16.el9 Β· GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms