#include <iostream>
namespace A { typedef int foo; }
typedef int foo;
int main()
{
static_cast<foo*>(0);
static_cast<A::foo*>(0);
}
For some reason, the second static_cast has a red error underline. It only seems to appear when using a cast with a type inside a namespace (or better: when you use the :: operator, as it also applies to nested types)