Bug 34800 - StructureTransitionTable.h fails to compile under VS2010 RC
Summary: StructureTransitionTable.h fails to compile under VS2010 RC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords: PlatformOnly
Depends on:
Blocks:
 
Reported: 2010-02-10 07:34 PST by Adam Roben (:aroben)
Modified: 2010-04-27 07:44 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2010-02-10 07:34:37 PST
StructureTransitionTable.h fails to compile under VS2010 RC. The Transition(0, structure) and Transition(structure, 0) expressions generate a C2664 error about not being able to convert int to Structure*. The ints in question are the 0s in the expressions.

This is a known bug in C++0x [1] and VS2010 RC [2]. It will apparently be fixed by the introduction of concepts to the STL [3].

In the meantime, we can work around the issue by either changing the 0s to nullptrs (which only works in C++0x, though obviously a macro could be used to make it work in older versions of C++), or by wrapping them in reinterpret_cast<Structure*>().

1. http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#811
2. https://connect.microsoft.com/VisualStudio/feedback/details/505476/problem-with-std-pair-int-std-string-constructor?wa=wsignin1.0
3. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2770.pdf
Comment 1 Adam Roben (:aroben) 2010-04-27 07:44:04 PDT
This was fixed by r58308 as part of fixing bug 37867.