gcc/libstdc++-v3/testsuite/24_iterators/customization_points
Jonathan Wakely f094665d46 libstdc++: Avoid constraint recursion with iterator_traits (PR 93983)
Checking whether a filesystem::path constructor argument is an iterator
requires instantiating std::iterator_traits. In C++20 that checks for
satisfaction of std::iterator_traits constraints, which checks if the
type is copyable, which can end up recursing back to the path
constructor. The fix in LWG 3420 is to reorder the cpp17-iterator
concept's constraints to check if the type looks vaguely like an
iterator before checking copyable. That avoids the recursion for types
which definitely aren't iterators, but isn't foolproof.

	PR libstdc++/93983
	* include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
	Reorder constraints to avoid recursion when constructors use
	iterator_traits (LWG 3420).
	* testsuite/24_iterators/customization_points/lwg3420.cc: New test.
2020-05-21 07:32:15 +01:00
..
92894.cc libstdc++: Replace deduced return type in ranges::iter_move (PR 92894) 2020-05-01 14:27:25 +01:00
iter_move.cc
iter_swap.cc
lwg3420.cc libstdc++: Avoid constraint recursion with iterator_traits (PR 93983) 2020-05-21 07:32:15 +01:00