<!DOCTYPE html><html lang='en'><head><title>[fs.class.directory_iterator]</title><meta charset='UTF-8'/><link rel='stylesheet' type='text/css' href='14882.css'/><link rel='stylesheet' type='text/css' href='expanded.css' title='Notes and examples expanded'/><link rel='alternate stylesheet' type='text/css' href='colored.css' title='Notes and examples colored'/><link rel='alternate stylesheet' type='text/css' href='collapsed.css' title='Notes and examples collapsed'/><link rel='icon' href='icon.png'/></head><body><div class='wrapper'><h1 ><a class='secnum' style='min-width:73pt'>28</a> Input/output library <a class='abbr_ref' href='./#input.output'>[input.output]</a></h1><h2 ><a class='secnum' style='min-width:88pt'>28.11</a> File systems <a class='abbr_ref' href='filesystems#fs.class.directory_iterator'>[filesystems]</a></h2><h3 ><a class='secnum' style='min-width:103pt'>28.11.12</a> Class <span class='texttt'>directory_&shy;iterator</span> <a class='abbr_ref'>[fs.class.directory_iterator]</a></h3><span class='indexparent'><a class='index' id='lib:directory_iterator'></a></span><div class='para' id='1'><div class='marginalizedparent'><a class='marginalized' href='#1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13836'>#</a></div><div id='1.sentence-1' class='sentence'>An object of type <span class='texttt'>directory_&shy;iterator</span> provides an iterator for a
sequence of <span class='texttt'>directory_&shy;entry</span> elements representing the
path and any cached attribute values (<a href='fs.class.directory_entry'>[fs.class.directory_entry]</a>)
for each file in a directory
or in an <span class='indexparent'><a class='index' id=':type_of_a_directory-like_file'></a></span>implementation-defined directory-like file type<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.note-1' class='note'>[<span style='white-space:nowrap'> </span><a class='note_link' href='#1.note-1'><span class='textit'>Note</span></a><div class='noteBody'><span class='textit'>:</span> <div id='1.sentence-2' class='sentence'>For iteration into sub-directories, see class <span class='texttt'>recursive_&shy;directory_&shy;iterator</span> (<a href='fs.class.rec.dir.itr'>[fs.class.rec.dir.itr]</a>)<a class='hidden_link' href='#1.sentence-2'>.</a></div> —<span style='white-space:nowrap'> </span><i>end note</i></div><span style='white-space:nowrap'> </span>]</div> <pre class='codeblock'>
<span class='keyword'>namespace</span> std<span class='operator'>:</span><span class='operator'>:</span>filesystem <span class='curlybracket'>{</span>
  <span class='keyword'>class</span> directory_iterator <span class='curlybracket'>{</span>
  <span class='keyword'>public</span><span class='operator'>:</span>
    <span class='keyword'>using</span> iterator_category <span class='operator'>=</span> input_iterator_tag;
    <span class='keyword'>using</span> value_type        <span class='operator'>=</span> directory_entry;
    <span class='keyword'>using</span> difference_type   <span class='operator'>=</span> ptrdiff_t;
    <span class='keyword'>using</span> pointer           <span class='operator'>=</span> <span class='keyword'>const</span> directory_entry<span class='operator'>*</span>;
    <span class='keyword'>using</span> reference         <span class='operator'>=</span> <span class='keyword'>const</span> directory_entry<span class='operator'>&amp;</span>;

    <span class='comment'>// <a href='#fs.dir.itr.members'>[fs.dir.itr.members]</a>, member functions</span>
    directory_iterator<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>;
    <span class='keyword'>explicit</span> directory_iterator<span class='parenthesis'>(</span><span class='keyword'>const</span> path<span class='operator'>&amp;</span> p<span class='parenthesis'>)</span>;
    directory_iterator<span class='parenthesis'>(</span><span class='keyword'>const</span> path<span class='operator'>&amp;</span> p, directory_options options<span class='parenthesis'>)</span>;
    directory_iterator<span class='parenthesis'>(</span><span class='keyword'>const</span> path<span class='operator'>&amp;</span> p, error_code<span class='operator'>&amp;</span> ec<span class='parenthesis'>)</span>;
    directory_iterator<span class='parenthesis'>(</span><span class='keyword'>const</span> path<span class='operator'>&amp;</span> p, directory_options options,
                       error_code<span class='operator'>&amp;</span> ec<span class='parenthesis'>)</span>;
    directory_iterator<span class='parenthesis'>(</span><span class='keyword'>const</span> directory_iterator<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
    directory_iterator<span class='parenthesis'>(</span>directory_iterator<span class='operator'>&amp;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>;
    <span class='operator'>~</span>directory_iterator<span class='parenthesis'>(</span><span class='parenthesis'>)</span>;

    directory_iterator<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> directory_iterator<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
    directory_iterator<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span>directory_iterator<span class='operator'>&amp;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>;

    <span class='keyword'>const</span> directory_entry<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
    <span class='keyword'>const</span> directory_entry<span class='operator'>*</span> <span class='keyword'>operator</span><span class='operator'>-</span><span class='anglebracket'>&gt;</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>const</span>;
    directory_iterator<span class='operator'>&amp;</span>    <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span>;
    directory_iterator<span class='operator'>&amp;</span>    increment<span class='parenthesis'>(</span>error_code<span class='operator'>&amp;</span> ec<span class='parenthesis'>)</span>;

    <span class='comment'>// other members as required by <a href='input.iterators'>[input.iterators]</a>, input iterators</span>
  <span class='curlybracket'>}</span>;
<span class='curlybracket'>}</span>
</pre></div><div class='para' id='2'><div class='marginalizedparent'><a class='marginalized' href='#2'>2</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13879'>#</a></div><div id='2.sentence-1' class='sentence'><span class='texttt'>directory_&shy;iterator</span> satisfies the
 <span class='textit'>Cpp17InputIterator</span> requirements (<a href='input.iterators'>[input.iterators]</a>)<a class='hidden_link' href='#2.sentence-1'>.</a></div></div><div class='para' id='3'><div class='marginalizedparent'><a class='marginalized' href='#3'>3</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13883'>#</a></div><div id='3.sentence-1' class='sentence'>If an iterator of type <span class='texttt'>directory_&shy;iterator</span> reports an error or
is advanced past the last directory element,
that iterator shall become equal to the end iterator
value<a class='hidden_link' href='#3.sentence-1'>.</a></div> <div id='3.sentence-2' class='sentence'>The <span class='texttt'>directory_&shy;iterator</span> default constructor shall
create an iterator equal to the end iterator value, and this shall be the only
valid iterator for the end condition<a class='hidden_link' href='#3.sentence-2'>.</a></div></div><div class='para' id='4'><div class='marginalizedparent'><a class='marginalized' href='#4'>4</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13891'>#</a></div><div id='4.sentence-1' class='sentence'>The end iterator is not dereferenceable<a class='hidden_link' href='#4.sentence-1'>.</a></div></div><div class='para' id='5'><div class='marginalizedparent'><a class='marginalized' href='#5'>5</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13894'>#</a></div><div id='5.sentence-1' class='sentence'>Two end iterators are always equal<a class='hidden_link' href='#5.sentence-1'>.</a></div> <div id='5.sentence-2' class='sentence'>An end iterator shall not be equal to a non-end
iterator<a class='hidden_link' href='#5.sentence-2'>.</a></div></div><div class='para' id='6'><div class='marginalizedparent'><a class='marginalized' href='#6'>6</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13898'>#</a></div><div id='6.sentence-1' class='sentence'>The result of calling the <span class='texttt'>path<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span> member of the <span class='texttt'>directory_&shy;entry</span> object obtained by dereferencing a <span class='texttt'>directory_&shy;iterator</span> is a reference to a <span class='texttt'>path</span> object composed of the directory argument from which the iterator was
constructed with filename of the directory entry appended as if by <span class='texttt'><span class='keyword'>operator</span><span class='operator'>/</span><span class='operator'>=</span></span><a class='hidden_link' href='#6.sentence-1'>.</a></div></div><div class='para' id='7'><div class='marginalizedparent'><a class='marginalized' href='#7'>7</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13902'>#</a></div><div id='7.sentence-1' class='sentence'>Directory iteration shall not yield directory entries for the current (dot)
and parent (dot-dot) directories<a class='hidden_link' href='#7.sentence-1'>.</a></div></div><div class='para' id='8'><div class='marginalizedparent'><a class='marginalized' href='#8'>8</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13906'>#</a></div><div id='8.sentence-1' class='sentence'>The order of directory entries obtained by dereferencing successive
increments of a <span class='texttt'>directory_&shy;iterator</span> is unspecified<a class='hidden_link' href='#8.sentence-1'>.</a></div></div><div class='para' id='9'><div class='marginalizedparent'><a class='marginalized' href='#9'>9</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13910'>#</a></div><div id='9.sentence-1' class='sentence'>Constructors and non-const <span class='texttt'>directory_&shy;iterator</span> member functions
store the values of any cached attributes (<a href='fs.class.directory_entry'>[fs.class.directory_entry]</a>)
in the <span class='texttt'>directory_&shy;entry</span> element returned by <span class='texttt'><span class='keyword'>operator</span><span class='operator'>*</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#9.sentence-1'>.</a></div> <div id='9.sentence-2' class='sentence'><span class='texttt'>directory_&shy;iterator</span> member functions shall not directly or indirectly call
any <span class='texttt'>directory_&shy;entry</span> <span class='texttt'>refresh</span> function<a class='hidden_link' href='#9.sentence-2'>.</a></div> <div id='9.note-1' class='note'>[<span style='white-space:nowrap'> </span><a class='note_link' href='#9.note-1'><span class='textit'>Note</span></a><div class='noteBody'><span class='textit'>:</span> <div id='9.sentence-3' class='sentence'>The exact mechanism for storing cached attribute values is not exposed to users<a class='hidden_link' href='#9.sentence-3'>.</a></div> <div id='9.sentence-4' class='sentence'>For exposition, class <span class='texttt'>directory_&shy;iterator</span> is shown in <a href='fs.class.directory_entry'>[fs.class.directory_entry]</a>
as a friend of class <span class='texttt'>directory_&shy;entry</span><a class='hidden_link' href='#9.sentence-4'>.</a></div> —<span style='white-space:nowrap'> </span><i>end note</i></div><span style='white-space:nowrap'> </span>]</div> </div><div class='para' id='10'><div class='marginalizedparent'><a class='marginalized' href='#10'>10</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13922'>#</a></div><div id='10.note-1' class='note'>[<span style='white-space:nowrap'> </span><a class='note_link' href='#10.note-1'><span class='textit'>Note</span></a><div class='noteBody'><span class='textit'>:</span> <div id='10.sentence-1' class='sentence'>Programs performing directory iteration may wish to test if the
path obtained by dereferencing a directory iterator actually exists<a class='hidden_link' href='#10.sentence-1'>.</a></div> <div id='10.sentence-2' class='sentence'>It could be
a symbolic link to a non-existent file<a class='hidden_link' href='#10.sentence-2'>.</a></div> <div id='10.sentence-3' class='sentence'>Programs recursively
walking directory trees for purposes of removing and renaming entries may wish
to avoid following symbolic links<a class='hidden_link' href='#10.sentence-3'>.</a></div> —<span style='white-space:nowrap'> </span><i>end note</i></div><span style='white-space:nowrap'> </span>]</div> </div><div class='para' id='11'><div class='marginalizedparent'><a class='marginalized' href='#11'>11</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13931'>#</a></div><div id='11.note-1' class='note'>[<span style='white-space:nowrap'> </span><a class='note_link' href='#11.note-1'><span class='textit'>Note</span></a><div class='noteBody'><span class='textit'>:</span> <div id='11.sentence-1' class='sentence'>If a file  is removed from or added to a directory after the
construction of a <span class='texttt'>directory_&shy;iterator</span> for the directory, it is
unspecified whether or not subsequently incrementing the iterator will ever
result in an iterator referencing the removed or added directory entry<a class='hidden_link' href='#11.sentence-1'>.</a></div> <div id='11.sentence-2' class='sentence'>See
POSIX <a href='http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html'><span class='texttt'>readdir_&shy;r</span></a><a class='hidden_link' href='#11.sentence-2'>.</a></div> —<span style='white-space:nowrap'> </span><i>end note</i></div><span style='white-space:nowrap'> </span>]</div> </div><div id='fs.dir.itr.members' class='section'><h4 ><a class='secnum' href='#fs.dir.itr.members' style='min-width:118pt'>28.11.12.1</a> Members <a class='abbr_ref' href='fs.dir.itr.members'>[fs.dir.itr.members]</a></h4><span class='indexparent'><a class='index' id='lib:directory_iterator,constructor'></a></span><div class='itemdecl' id='fs.dir.itr.members-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#fs.dir.itr.members-itemdecl:1'>🔗</a></div><code class='itemdeclcode'>directory_iterator<span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>;
</code></div><div class='itemdescr'></div><div class='para' id='fs.dir.itr.members-1'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13948'>#</a></div><div id='fs.dir.itr.members-1.sentence-1' class='sentence'><span class='textit'>Effects:</span> Constructs the end iterator<a class='hidden_link' href='#fs.dir.itr.members-1.sentence-1'>.</a></div></div></div><span class='indexparent'><a class='index' id='lib:directory_iterator,constructor_'></a></span><div class='itemdecl' id='fs.dir.itr.members-itemdecl:2'><div class='marginalizedparent'><a class='itemDeclLink' href='#fs.dir.itr.members-itemdecl:2'>🔗</a></div><code class='itemdeclcode'><span class='keyword'>explicit</span> directory_iterator<span class='parenthesis'>(</span><span class='keyword'>const</span> path<span class='operator'>&amp;</span> p<span class='parenthesis'>)</span>;
directory_iterator<span class='parenthesis'>(</span><span class='keyword'>const</span> path<span class='operator'>&amp;</span> p, directory_options options<span class='parenthesis'>)</span>;
directory_iterator<span class='parenthesis'>(</span><span class='keyword'>const</span> path<span class='operator'>&amp;</span> p, error_code<span class='operator'>&amp;</span> ec<span class='parenthesis'>)</span>;
directory_iterator<span class='parenthesis'>(</span><span class='keyword'>const</span> path<span class='operator'>&amp;</span> p, directory_options options, error_code<span class='operator'>&amp;</span> ec<span class='parenthesis'>)</span>;
</code></div><div class='itemdescr'></div><div class='para' id='fs.dir.itr.members-2'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13961'>#</a></div><div id='fs.dir.itr.members-2.sentence-1' class='sentence'><span class='textit'>Effects:</span> For the directory that <span class='texttt'>p</span> resolves to, constructs an
iterator for the first element in a sequence of <span class='texttt'>directory_&shy;entry</span>
elements representing the files in the directory, if any; otherwise the end
iterator<a class='hidden_link' href='#fs.dir.itr.members-2.sentence-1'>.</a></div> <div id='fs.dir.itr.members-2.sentence-2' class='sentence'>However, if
<pre class='codeblock'>
<span class='parenthesis'>(</span>options <span class='operator'>&amp;</span> directory_options<span class='operator'>:</span><span class='operator'>:</span>skip_permission_denied<span class='parenthesis'>)</span> <span class='operator'>!</span><span class='operator'>=</span> directory_options<span class='operator'>:</span><span class='operator'>:</span>none
</pre>
and construction encounters an error indicating
that permission to access <span class='texttt'>p</span> is denied, constructs the end iterator
and does not report an error<a class='hidden_link' href='#fs.dir.itr.members-2.sentence-2'>.</a></div></div></div><div class='para' id='fs.dir.itr.members-3'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13973'>#</a></div><div id='fs.dir.itr.members-3.sentence-1' class='sentence'><span class='textit'>Throws:</span> As specified in <a href='fs.err.report'>[fs.err.report]</a><a class='hidden_link' href='#fs.dir.itr.members-3.sentence-1'>.</a></div></div></div><div class='para' id='fs.dir.itr.members-4'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-4'>4</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13976'>#</a></div><div id='fs.dir.itr.members-4.note-1' class='note'>[<span style='white-space:nowrap'> </span><a class='note_link' href='#fs.dir.itr.members-4.note-1'><span class='textit'>Note</span></a><div class='noteBody'><span class='textit'>:</span> <div id='fs.dir.itr.members-4.sentence-1' class='sentence'>To iterate over the current directory, use <span class='texttt'>directory_&shy;iterator<span class='parenthesis'>(</span><span class='literal'>"."</span><span class='parenthesis'>)</span></span> rather than <span class='texttt'>directory_&shy;iterator<span class='parenthesis'>(</span><span class='literal'>""</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#fs.dir.itr.members-4.sentence-1'>.</a></div> —<span style='white-space:nowrap'> </span><i>end note</i></div><span style='white-space:nowrap'> </span>]</div> </div></div><span class='indexparent'><a class='index' id='lib:directory_iterator,constructor__'></a></span><div class='itemdecl' id='fs.dir.itr.members-itemdecl:3'><div class='marginalizedparent'><a class='itemDeclLink' href='#fs.dir.itr.members-itemdecl:3'>🔗</a></div><code class='itemdeclcode'>directory_iterator<span class='parenthesis'>(</span><span class='keyword'>const</span> directory_iterator<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
directory_iterator<span class='parenthesis'>(</span>directory_iterator<span class='operator'>&amp;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>;
</code></div><div class='itemdescr'></div><div class='para' id='fs.dir.itr.members-5'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-5'>5</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13987'>#</a></div><div id='fs.dir.itr.members-5.sentence-1' class='sentence'><span class='textit'>Effects:</span> Constructs an object of class <span class='texttt'>directory_&shy;iterator</span><a class='hidden_link' href='#fs.dir.itr.members-5.sentence-1'>.</a></div></div></div><div class='para' id='fs.dir.itr.members-6'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-6'>6</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L13990'>#</a></div><div id='fs.dir.itr.members-6.sentence-1' class='sentence'><span class='textit'>Ensures:</span> <span class='texttt'><span class='operator'>*</span><span class='keyword'>this</span></span> has the original value of <span class='texttt'>rhs</span><a class='hidden_link' href='#fs.dir.itr.members-6.sentence-1'>.</a></div></div></div><span class='indexparent'><a class='index' id='lib:operator=,directory_iterator'></a></span><span class='indexparent'><a class='index' id='lib:directory_iterator,operator='></a></span><div class='itemdecl' id='fs.dir.itr.members-itemdecl:4'><div class='marginalizedparent'><a class='itemDeclLink' href='#fs.dir.itr.members-itemdecl:4'>🔗</a></div><code class='itemdeclcode'>directory_iterator<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span><span class='keyword'>const</span> directory_iterator<span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span>;
directory_iterator<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>=</span><span class='parenthesis'>(</span>directory_iterator<span class='operator'>&amp;</span><span class='operator'>&amp;</span> rhs<span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>;
</code></div><div class='itemdescr'></div><div class='para' id='fs.dir.itr.members-7'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-7'>7</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L14001'>#</a></div><div id='fs.dir.itr.members-7.sentence-1' class='sentence'><span class='textit'>Effects:</span> If <span class='texttt'><span class='operator'>*</span><span class='keyword'>this</span></span> and <span class='texttt'>rhs</span> are the same
  object, the member has no effect<a class='hidden_link' href='#fs.dir.itr.members-7.sentence-1'>.</a></div></div></div><div class='para' id='fs.dir.itr.members-8'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-8'>8</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L14005'>#</a></div><div id='fs.dir.itr.members-8.sentence-1' class='sentence'><span class='textit'>Ensures:</span> <span class='texttt'><span class='operator'>*</span><span class='keyword'>this</span></span> has the original value of <span class='texttt'>rhs</span><a class='hidden_link' href='#fs.dir.itr.members-8.sentence-1'>.</a></div></div></div><div class='para' id='fs.dir.itr.members-9'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-9'>9</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L14008'>#</a></div><div id='fs.dir.itr.members-9.sentence-1' class='sentence'><span class='textit'>Returns:</span> <span class='texttt'><span class='operator'>*</span><span class='keyword'>this</span></span><a class='hidden_link' href='#fs.dir.itr.members-9.sentence-1'>.</a></div></div></div><span class='indexparent'><a class='index' id='lib:increment,directory_iterator'></a></span><span class='indexparent'><a class='index' id='lib:directory_iterator,increment'></a></span><span class='indexparent'><a class='index' id='lib:operator++,directory_iterator'></a></span><span class='indexparent'><a class='index' id='lib:directory_iterator,operator++'></a></span><div class='itemdecl' id='fs.dir.itr.members-itemdecl:5'><div class='marginalizedparent'><a class='itemDeclLink' href='#fs.dir.itr.members-itemdecl:5'>🔗</a></div><code class='itemdeclcode'>directory_iterator<span class='operator'>&amp;</span> <span class='keyword'>operator</span><span class='operator'>+</span><span class='operator'>+</span><span class='parenthesis'>(</span><span class='parenthesis'>)</span>;
directory_iterator<span class='operator'>&amp;</span> increment<span class='parenthesis'>(</span>error_code<span class='operator'>&amp;</span> ec<span class='parenthesis'>)</span>;
</code></div><div class='itemdescr'></div><div class='para' id='fs.dir.itr.members-10'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-10'>10</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L14021'>#</a></div><div id='fs.dir.itr.members-10.sentence-1' class='sentence'><span class='textit'>Effects:</span> As specified for the prefix increment operation of
<a href='input.iterators'>Input iterators</a><a class='hidden_link' href='#fs.dir.itr.members-10.sentence-1'>.</a></div></div></div><div class='para' id='fs.dir.itr.members-11'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-11'>11</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L14025'>#</a></div><div id='fs.dir.itr.members-11.sentence-1' class='sentence'><span class='textit'>Returns:</span> <span class='texttt'><span class='operator'>*</span><span class='keyword'>this</span></span><a class='hidden_link' href='#fs.dir.itr.members-11.sentence-1'>.</a></div></div></div><div class='para' id='fs.dir.itr.members-12'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.members-12'>12</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L14028'>#</a></div><div id='fs.dir.itr.members-12.sentence-1' class='sentence'><span class='textit'>Throws:</span> As specified in <a href='fs.err.report'>[fs.err.report]</a><a class='hidden_link' href='#fs.dir.itr.members-12.sentence-1'>.</a></div></div></div></div><div id='fs.dir.itr.nonmembers' class='section'><h4 ><a class='secnum' href='#fs.dir.itr.nonmembers' style='min-width:118pt'>28.11.12.2</a> Non-member functions <a class='abbr_ref' href='fs.dir.itr.nonmembers'>[fs.dir.itr.nonmembers]</a></h4><div class='para' id='fs.dir.itr.nonmembers-1'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.nonmembers-1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L14035'>#</a></div><div id='fs.dir.itr.nonmembers-1.sentence-1' class='sentence'>These functions enable range access for <span class='texttt'>directory_&shy;iterator</span><a class='hidden_link' href='#fs.dir.itr.nonmembers-1.sentence-1'>.</a></div> <span class='indexparent'><a class='index' id='lib:begin,directory_iterator'></a></span></div><div class='itemdecl' id='fs.dir.itr.nonmembers-itemdecl:1'><div class='marginalizedparent'><a class='itemDeclLink' href='#fs.dir.itr.nonmembers-itemdecl:1'>🔗</a></div><code class='itemdeclcode'>directory_iterator begin<span class='parenthesis'>(</span>directory_iterator iter<span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>;
</code></div><div class='itemdescr'></div><div class='para' id='fs.dir.itr.nonmembers-2'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.nonmembers-2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L14044'>#</a></div><div id='fs.dir.itr.nonmembers-2.sentence-1' class='sentence'><span class='textit'>Returns:</span> <span class='texttt'>iter</span><a class='hidden_link' href='#fs.dir.itr.nonmembers-2.sentence-1'>.</a></div></div></div><span class='indexparent'><a class='index' id='lib:end,directory_iterator'></a></span><div class='itemdecl' id='fs.dir.itr.nonmembers-itemdecl:2'><div class='marginalizedparent'><a class='itemDeclLink' href='#fs.dir.itr.nonmembers-itemdecl:2'>🔗</a></div><code class='itemdeclcode'>directory_iterator end<span class='parenthesis'>(</span><span class='keyword'>const</span> directory_iterator<span class='operator'>&amp;</span><span class='parenthesis'>)</span> <span class='keyword'>noexcept</span>;
</code></div><div class='itemdescr'></div><div class='para' id='fs.dir.itr.nonmembers-3'><div class='marginalizedparent'><a class='marginalized' href='#fs.dir.itr.nonmembers-3'>3</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/Eelis/draft73ca144c7e48612fe72742f9f6a5ec9ad6a934d2/source/iostreams.tex#L14054'>#</a></div><div id='fs.dir.itr.nonmembers-3.sentence-1' class='sentence'><span class='textit'>Returns:</span> <span class='texttt'>directory_&shy;iterator<span class='parenthesis'>(</span><span class='parenthesis'>)</span></span><a class='hidden_link' href='#fs.dir.itr.nonmembers-3.sentence-1'>.</a></div></div></div></div></div></body></html>