I am porting a large C++ COM project from VS2008 to VS2010. There is a line of code as follows, which compiles fine in my VS2008 project, but gives the referenced error when compiled in VS2010:
std::select2nd<std::map<DWORD, ISomethingUseful*>::value_type>());
The compile error is:
error C2039: 'select2nd' : is not a member of 'std'
I know this is a "non standard" function, but whoever wrote this code originally found it in the std namespace in VS2008, and whichever #include they used seems to be no longer correct in VS2010.
Does anyone know where this function is now in VS2010? And specifically which header file needs to be included now to use it?
EDIT: To get around this problem for now I've grabbed the code from the VS2008 VC\include\functional header file, and included in my code base (inside a utility class) as outlined in my answer below.
Would still appreciate any insights that anyone else is able to provide!