std::filesystem::recursive_directory_iterator::disable_recursion_pending (3) - Linux Manuals
std::filesystem::recursive_directory_iterator::disable_recursion_pending: std::filesystem::recursive_directory_iterator::disable_recursion_pending
NAME
std::filesystem::recursive_directory_iterator::disable_recursion_pending - std::filesystem::recursive_directory_iterator::disable_recursion_pending
Synopsis
void disable_recursion_pending(); (since C++17)
Disables recursion to the currently referred subdirectory, if any.
The call modifies the pending recursion flag on the iterator in such a way that the next time increment is called, the iterator will advance within the current directly even if it is currently referring to a subdirectory that hasn't been visited.
The status of the pending recursion flag can be queried with recursion_pending(), which is false after this call. It is reset back to true after increment, and its initial value is also true.
The behavior is undefined if *this is the end iterator.
Parameters
(none)
Return value
(none)
Exceptions
(none)
Example
// Run this code
Output:
See also
recursion_pending (public member function)
increment (public member function)
operator++