this is basically illegal
Yes, it is.
So, my question is, what on earth might they be compiling this with that allows it?
Perhaps, they never include both headers in the same translation unit. In that case most compilers won't be able to diagnose the error (which isn't required to be diagnosed); and there's a chance that you'll still end up with a working program. You're definitely in the world of undefined behaviour, though.
Is this some new feature of C++11?
No. You can do various interesting things with using
to create aliases; but you still can't declare a type as both a class and a typedef
.