std::filesystem::recursive_directory_iterator::operator++, (3) - Linux Manuals
std::filesystem::recursive_directory_iterator::operator++,: std::filesystem::recursive_directory_iterator::operator++,
Command to display std::filesystem::recursive_directory_iterator::operator++,
manual in Linux: $ man 3 std::filesystem::recursive_directory_iterator::operator++,
NAME
std::filesystem::recursive_directory_iterator::operator++, - std::filesystem::recursive_directory_iterator::operator++,
Synopsis
recursive_directory_iterator& operator++(); (since C++17)
recursive_directory_iterator& increment( std::error_code& ec ); (since C++17)
Advances the iterator to the next entry. Invalidates all copies of the previous
value of *this.
If there are no more entries left in the currently iterated directory, the iteration
is resumed over the parent directory. The process is repeated if the parent
directory has no sibling entries that can to be iterated on. If the parent of the
directory hierarchy that has been recursively iterated on is reached (there are no
candidate entries at depth() == 0), *this is set to an end iterator.
Otherwise, if *this refers to a directory, it is iterated into if the following
conditions are met:
* disable_recursion_pending() has not been called before this increment, i.e.
recursion_pending() == true.
* The directory is not a symlink or following symlinks is enabled, i.e., at least
one of the following is true:
* !is_symlink((*this)->symlink_status()).
* (options() & directory_options::follow_directory_symlink) !=
directory_options::none)
Parameters
ec - error code to store the error status to
Return value
*this
Exceptions
The overload that does not take a std::error_code& parameter throws filesystem_error
on underlying OS API errors, constructed with the OS error code as the error code
argument. The overload taking a std::error_code& parameter sets it to the OS API
error code if an OS API call fails, and executes ec.clear() if no errors occur. Any
overload not marked noexcept may throw std::bad_alloc if memory allocation fails.
Defect reports
The following behavior-changing defect reports were applied retroactively to
previously published C++ standards.
DR Applied to Behavior as published Correct behavior
LWG 3013 C++17 error_code overload marked noexcept but can noexcept removed
allocate memory
Pages related to std::filesystem::recursive_directory_iterator::operator++,
- std::filesystem::recursive_directory_iterator::operator++,std::filesystem::recursive_directory_iterator::increment (3) - std::filesystem::recursive_directory_iterator::operator++,std::filesystem::recursive_directory_iterator::increment
- std::filesystem::recursive_directory_iterator::operator*,std::filesystem::recursive_directory_iterator::operator-> (3) - std::filesystem::recursive_directory_iterator::operator*,std::filesystem::recursive_directory_iterator::operator->
- std::filesystem::recursive_directory_iterator::operator= (3) - std::filesystem::recursive_directory_iterator::operator=
- std::filesystem::recursive_directory_iterator::options (3) - std::filesystem::recursive_directory_iterator::options
- std::filesystem::recursive_directory_iterator::depth (3) - std::filesystem::recursive_directory_iterator::depth
- std::filesystem::recursive_directory_iterator::disable_recursion_pending (3) - std::filesystem::recursive_directory_iterator::disable_recursion_pending
- std::filesystem::recursive_directory_iterator::pop (3) - std::filesystem::recursive_directory_iterator::pop
- std::filesystem::recursive_directory_iterator::recursion_pending (3) - std::filesystem::recursive_directory_iterator::recursion_pending
- std::filesystem::recursive_directory_iterator::recursive_directory_iterator (3) - std::filesystem::recursive_directory_iterator::recursive_directory_iterator
- std::filesystem::recursive_directory_iterator (3) - std::filesystem::recursive_directory_iterator
- std::filesystem::read_symlink (3) - std::filesystem::read_symlink
- std::filesystem::relative,std::filesystem::proximate (3) - std::filesystem::relative,std::filesystem::proximate
- std::filesystem::remove,std::filesystem::remove_all (3) - std::filesystem::remove,std::filesystem::remove_all
- std::filesystem::rename (3) - std::filesystem::rename
- std::filesystem::resize_file (3) - std::filesystem::resize_file
- std::filesystem::absolute (3) - std::filesystem::absolute
- std::filesystem::begin(directory_iterator),std::filesystem::end(directory_iterator) (3) - std::filesystem::begin(directory_iterator),std::filesystem::end(directory_iterator)
- std::filesystem::begin(recursive_directory_iterator), (3) - std::filesystem::begin(recursive_directory_iterator),
- std::filesystem::begin(recursive_directory_iterator),std::filesystem::end(recursive_directory_iterator) (3) - std::filesystem::begin(recursive_directory_iterator),std::filesystem::end(recursive_directory_iterator)
- std::filesystem::canonical,std::filesystem::weakly_canonical (3) - std::filesystem::canonical,std::filesystem::weakly_canonical
- std::filesystem::copy (3) - std::filesystem::copy