Hi all, I'm working on a good sized project and after the latest code updates, I'm getting a compiler error the source of which is difficult to interpret:

1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1049) : error C2143: syntax error : missing ')' before '&'
1> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1083) : see reference to class template instantiation 'std::tr1::function<_Fty>' being compiled


It's actually one of 19 errors from the same file (functional).


This is the code (microsoft's code) at that line of the first error:

void swap(_Myt& _Right)
{ // swap with _Right
this->_Swap(_Right);
}


This happens when compiling a .cpp file that does not appear to use std::tr1::function or anything related to it. In fact, the code changes I made recently were not to the .cpp file that fails compilation due to this error. Typically, I can search the 'net and find a solution but this one has me stumped.

It would appear that the compiler doesn't understand what a _Myt or _Fty type is. That makes two of us, but it IS defined above in the 'functional' file:

template<class _Fty>
class function
: public _Get_function_impl<_Fty>::_Type
{ // wrapper for callable objects
public:
typedef function<_Fty> _Myt;

Unfortunately, I can't post example code because the entirety of my project is too big to post and the compiler isn't pointing to any particular file of my project. Any help in getting started down the path of finding where the problem is would be fantastic. Here are the rest of the errors generated:



Code:
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1049) : error C2143: syntax error : missing ')' before '&'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1083) : see reference to class template instantiation 'std::tr1::function<_Fty>' being compiled
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1049) : error C2143: syntax error : missing ';' before '&'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1049) : error C2182: '_Myt' : illegal use of type 'void'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1049) : error C2377: 'std::tr1::function<_Fty>::_Myt' : redefinition; typedef cannot be overloaded with any other symbol
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(953) : see declaration of 'std::tr1::function<_Fty>::_Myt'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1049) : error C2143: syntax error : missing ';' before '<<'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1049) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1049) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1050) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1087) : warning C4002: too many actual parameters for macro 'swap'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1087) : error C2143: syntax error : missing ')' before '&'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1087) : error C2143: syntax error : missing ';' before '&'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1087) : error C2182: 'function<_Fty>' : illegal use of type 'void'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1087) : error C2936: 'std::tr1::function<_Fty>' : template-class-id redefined as a global data variable
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1087) : error C2143: syntax error : missing ';' before '<<'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1087) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1087) : error C2065: '_Fty' : undeclared identifier
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1094) : error C2065: '_Fty' : undeclared identifier
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1095) : error C2143: syntax error : missing ';' before '{'
1>C:\Program Files\Microsoft Visual Studio 9.0\VC\include\functional(1095) : error C2447: '{' : missing function header (old-style formal list?)