Code Inspection seems to ignore for-loops for range-based-for conversions if an ASSERT() is in the loop (see 1. loop in the following image). If I comment out the ASSERT() line, then the range-based-for conversion is available (2. loop). If I convert the code manually, it compiles (3. loop).

Is this a bug or is this intended?
I'm using VAX 2283, VS 2012, Windows 7.
Code for copy/pasting:#include <vector>
#include <afx.h>
void test()
{
    struct _s { int a; };
    std::vector<_s> v;
    int x = 0;
    for(auto it = v.begin(); it != v.end(); it++)
    {
        ASSERT(it->a != 0);
        x += it->a;
    }
}
Kind regards,
Marcus