mercredi 18 mars 2015

ambiguous overload for 'operator!=' issue


I am porting some ATL based headers into Mingw and came across problem with this code



CComBSTR bstrHelpFile;
hr = pTypeLib->GetDocumentation(-1, NULL, NULL, NULL, &bstrHelpFile);

if (SUCCEEDED(hr) && bstrHelpFile != NULL)
{
..
}


The error message that I get is this



C:\mingw64\opt\atlmfc\include/atlbase.h:5882:37: error: ambiguous overload for 'operator!=' (operand types are 'ATL::CComBSTR' and 'long long int')
if (SUCCEEDED(hr) && bstrHelpFile != NULL)
^
C:\mingw64\opt\atlmfc\include/atlbase.h:5882:37: note: candidates are:
C:\mingw64\opt\atlmfc\include/atlbase.h:5882:37: note: operator!=(BSTR {aka wchar_t*}, BSTR {aka wchar_t*}) <built-in>


This is the code from the ATL header atlbase.h


Any suggestions on how I could resolve this issue ?




Aucun commentaire:

Enregistrer un commentaire