Make folly::detail::IteratorAdaptor default-constructible
Summary: [Forward iterators are required to be default constructible](https://en.cppreference.com/w/cpp/named_req/ForwardIterator). So as of today, `IteratorAdaptor` is lying! We should default construct the wrapped iterator into a [singular iterator](https://eel.is/c++draft/iterator.requirements#general-7): > Iterators can also have singular values that are not associated with any sequence. Results of most expressions are undefined for singular values; the only exceptions are destroying an iterator that holds a singular value, the assignment of a non-singular value to an iterator that holds a singular value, and, for iterators that meet the `Cpp17DefaultConstructible` requirements, using a value-initialized iterator as the source of a copy or move operation. Reviewed By: yfeldblum, mshneer Differential Revision: D29578765 fbshipit-source-id: 7f2f0762b17f0b1a056532fc5db2abdd76cca3ea
Showing
Please register or sign in to comment