gcc/libstdc++-v3/testsuite/experimental
Jonathan Wakely 2f93a2a03a libstdc++: Use non-throwing increment in recursive_directory_iterator [PR 97731]
As described in the PR, the recursive_directory_iterator constructor
calls advance(ec), but ec is a pointer so it calls _Dir::advance(bool).
The intention was to either call advance() or advance(*ec) depending
whether the pointer is null or not.

This fixes the bug and renames the parameter to ecptr to make similar
mistakes less likely in future.

libstdc++-v3/ChangeLog:

	PR libstdc++/97731
	* src/filesystem/dir.cc (recursive_directory_iterator): Call the
	right overload of _Dir::advance.
	* testsuite/experimental/filesystem/iterators/97731.cc: New test.
2020-11-05 18:01:26 +00:00
..
algorithm
any libstdc++: Avoid warnings in tests 2020-10-29 22:47:21 +00:00
array
chrono
deque
filesystem libstdc++: Use non-throwing increment in recursive_directory_iterator [PR 97731] 2020-11-05 18:01:26 +00:00
forward_list
functional
iterator
list
map
memory libstdc++: Avoid warnings in tests 2020-10-29 22:47:21 +00:00
memory_resource libstdc++: Avoid warnings in tests 2020-10-29 22:47:21 +00:00
net
numeric
optional
polymorphic_allocator
propagate_const
random
ratio
set
source_location libstdc++: Avoid warnings in tests 2020-10-29 22:47:21 +00:00
string
string_view
system_error
tuple
type_erased_allocator
type_traits
unordered_map
unordered_set
vector
feat-char8_t.cc
feat-cxx14.cc
feat-lib-fund.cc
names.cc