| Summary: | Use std::iterator to implement iterator_category and the other iterator requirements | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Darin Adler <darin> | ||||
| Component: | New Bugs | Assignee: | Darin Adler <darin> | ||||
| Status: | RESOLVED INVALID | ||||||
| Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, ews-watchlist, ysuzuki | ||||
| Priority: | P2 | ||||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Darin Adler
2020-05-09 12:43:20 PDT
Created attachment 398935 [details]
Patch
std::iterator is now deprecated in C++17, and defining these five typedefs in iterator class becomes the recommended way.
using iterator_category = Category;
using value_type = T;
using difference_type = Distance;
using pointer = Pointer;
using reference = Reference;
https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/
It seems that we need to do the opposite thing :), or we should create std::iterator like thing in WTF and replace the current use of std::iterator with that.
OK. There are 14 places we are using std::iterator. |