build 1823, VS2008
When the same variable name is used in two for loops, VA sometimes gets confused about which is which. It only happens with fairly complex declarations.
In the code below, VA thinks the x in line A is the one in the second for loop (it shows it in the context field, shows its member, underlines the aaa).
#include <vector>
struct Aaa
{
int aaa;
};
struct Bbb
{
int bbb;
};
std::vector<Aaa> a;
std::vector<Bbb> b;
int main()
{
for (vector<Aaa>::iterator x = a.begin(); x != a.end(); ++x)
{
(*x).aaa; // line A
}
for (vector<Bbb>::iterator x = b.begin(); x != b.end(); ++x)
{
(*x).bbb;
}
}