<br><br><div class="gmail_quote">On Tue, Sep 13, 2011 at 2:29 AM, NAKAMURA Takumi <span dir="ltr"><<a href="mailto:geek4civic@gmail.com">geek4civic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2011/9/13 David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>>:<br>
<div class="im">>> +      LiveOut[MBB] = LiveOutPair(VNI, (MachineDomTreeNode *)0);<br>
><br>
> That's kind of strange - why's the cast necessary here? (what error do you<br>
> get on MSVC)<br>
<br>
</div>It was "error C2439" and "C2440".<br>
Ask to google, "C2440 std::pair null".<br>
<br>
It might be happier if DataTypes.h would provide "nullptr"...</blockquote><div><br></div><div>Ah, right, of course - yeah, we could potentially conditionally make a macro version of nullptr (or we could use a custom macro name that resolves to nullptr under 0x/MSVC) in non-MSVC environments that's 0 (or, better, __null under libs that provide __null, and then 0 elsewhere)).</div>
<div><br></div><div>But it looks like MSVC's STL headers do have a _HAS_CXX0X macro that can be defined to 0 to, notionally, remove C++0x features - but it doesn't seem to remove this particular constructor, which is a pity. & I can't find any other options/switches/arguments to turn off C++0x in MSVC.<br>
<br>Could you file a bug on this on Microsoft Connect?</div><div><br></div><div>[& while I'm mentioning it - I seem to recall one of the "MSVC compatibility" changes to Clang say that MSVC's <string> doesn't compile without MSVC's one-phase name lookup hackery. I'll bet that they'd be interested in fixing that, on principle - worth a try reporting it too]</div>
<div><br></div><div>- David</div></div>