It's not just <string>, but any STL header. After a bit of research and testing, I found that commenting out all the "#include <X>" lines made it compile instantly like it used to, where X is one of 'list', 'limits', 'string', 'sstream', and so on. Of course, the compilation failed since I had only commented out the include directives and the rest of my code still contained references to the STL classes. But the point is that it failed instantly.
Interestingly enough, I uncommented one of the STL include directives, and the compilation time shot up again. It still failed since my code needs all of them to compile correctly, but it took a long time to fail.
To summarize:
This takes a full two minutes to successfully compile:
#include <list>
#include <limits>
#include <string>
#include <sstream>
#define XML_STATIC
#define XML_UNICODE_WCHAR_T
#include <expat.h>
...
This instantly fails:
//#include <list>
//#include <limits>
//#include <string>
//#include <sstream>
#define XML_STATIC
#define XML_UNICODE_WCHAR_T
#include <expat.h>
...
This takes ~13 seconds to fail:
//#include <list>
//#include <limits>
#include <string>
//#include <sstream>
#define XML_STATIC
#define XML_UNICODE_WCHAR_T
#include <expat.h>
...
I'm using Visual C++ 2008 Express Edition. I work on the project from different locations, and this only happens at one of them.