The value_type is a const pointer, which makes the iteator non-copyable.
Before the patch, the normal usage like below was illegal:
auto It = lookupresult.begin(); ... It = lookupresult.end(); // the copy is not allowed.
Differential D91158
Fix the DeclContextLookupResult::iterator non-copyable. hokein on Nov 10 2020, 6:31 AM. Authored by
Details The value_type is a const pointer, which makes the iteator non-copyable. auto It = lookupresult.begin(); ... It = lookupresult.end(); // the copy is not allowed.
Diff Detail
Event Timeline
|
I wonder if this was meant to be const NamedDecl * - note that begin()/end() are const.
However I'm not sure (clang AST is always funny about const) and that would be a breaking change.