[webkit-reviews] review requested: [Bug 29919] JavaScriptCore/runtime/Structure.cpp doesn't compile on Visual Studio 2003 : [Attachment 40362] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 30 05:20:38 PDT 2009


Kent Hansen <khansen at trolltech.com> has asked  for review:
Bug 29919: JavaScriptCore/runtime/Structure.cpp doesn't compile on Visual
Studio 2003
https://bugs.webkit.org/show_bug.cgi?id=29919

Attachment 40362: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=40362&action=review

------- Additional Comments from Kent Hansen <khansen at trolltech.com>
The compiler complains about ambiguity in calls, apparently because there is a
"using std::make_pair" in the WTF namespace (wtf/HashTraits.h) and
Structure.cpp has both "using namespace std" and "using namespace WTF".
Removing "using namespace std" makes it compile without any other changes
needed.

Compiler output:

..\3rdparty\javascriptcore\JavaScriptCore\runtime\Structure.cpp(157) : error
C2872: 'make_pair' : ambiguous symbol
could be ''unknown-type' make_pair'
or '..\3rdparty\javascriptcore\JavaScriptCore\wtf\HashTraits.h(32) :
std::pair<_Ty1,_Ty2> std::make_pair(_Ty1,_Ty2)'
or 'make_pair'
..\3rdparty\javascriptcore\JavaScriptCore\runtime\Structure.cpp(397) : error
C2872: 'make_pair' : ambiguous symbol
could be ''unknown-type' make_pair'
or '..\3rdparty\javascriptcore\JavaScriptCore\wtf\HashTraits.h(32) :
std::pair<_Ty1,_Ty2> std::make_pair(_Ty1,_Ty2)'
or 'make_pair'
..\3rdparty\javascriptcore\JavaScriptCore\runtime\Structure.cpp(451) : error
C2872: 'make_pair' : ambiguous symbol
could be ''unknown-type' make_pair'
or '..\3rdparty\javascriptcore\JavaScriptCore\wtf\HashTraits.h(32) :
std::pair<_Ty1,_Ty2> std::make_pair(_Ty1,_Ty2)'
or 'make_pair'
..\3rdparty\javascriptcore\JavaScriptCore\runtime\Structure.cpp(875) : error
C2872: 'make_pair' : ambiguous symbol
could be ''unknown-type' make_pair'
or '..\3rdparty\javascriptcore\JavaScriptCore\wtf\HashTraits.h(32) :
std::pair<_Ty1,_Ty2> std::make_pair(_Ty1,_Ty2)'
or 'make_pair'
..\3rdparty\javascriptcore\JavaScriptCore\runtime\Structure.cpp(1037) : error
C2668: 'std::max' : ambiguous call to overloaded function
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xutility(1242):
could be 'const unsigned int &std::max(const unsigned int &,const unsigned int
&)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xutility(1242):
or 'const unsigned int &std::max(const unsigned int &,const unsigned int &)'
while trying to match the argument list '(unsigned int, unsigned int)'


More information about the webkit-reviews mailing list