Good news: with revision 10339, I commit jat1's great patch to handle template related code completion(see the test file added in this revision). Many thanks to Jat1!!!
To handle the iterator related code completion, we may need to improve the parser on how to parse a statement.
(*it).| code suggestion here
Now, we need some operator precedence parser. (currently, we can only handle some pattern like AAA::BBB().CCC). In the above statement, we may have three steps:
1. solve the "it" -> result1
2, solve the operator * of result1 -> result2
3, list all the children of result2 -> result3