Community
Participate
Working Groups
In the following code: struct intarr { int* first; int size; }; int* begin(const intarr& a) { return a.first; } // "find references" for this... int* end(const intarr& a) { return a.first + a.size; } int main() { intarr a; for (int i : a) // ... does not find this ; } If I do a "find references" on the "begin" or "end" function, the for loop is not found as a reference, even though it implicitly calls both. Range-based for loops for non-array types always call some begin() and end() functions, and they should be treated as referencing these functions.
I have added implicit names for 'begin' and 'end' to the range based for loop. With that the references are written to the index.