<div class="gmail_quote">On Wed, Jul 18, 2012 at 7:13 PM, James Dennett <span dir="ltr"><<a href="mailto:james.dennett@gmail.com" target="_blank">james.dennett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Jul 18, 2012 at 6:35 PM, Shang Yu <<a href="mailto:yusunn@gmail.com">yusunn@gmail.com</a>> wrote:<br>
> Hi James, this code is just a simplified example. In fact I<br>
> encountered the problem when I'm testing clang against boost. Please<br>
> see the attachment.<br>
<br>
</div>In the middle of the error message I see<br>
<div class="im"><br>
E:\SRC\LIBS\boost_1_49_0\boost/preprocessor/tuple/elem.hpp:36:114: note:<br>
      expanded from macro 'BOOST_PP_TUPLE_ELEM'<br>
  ...n), BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size), tuple))<br>
<br>
</div>and line 36 of boost/preprocessor/tuple/elem.hpp is inside a<br>
#    if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()<br>
block that presumably works around some MSVC problem, but in doing so<br>
relies on non-portable token pasting in this case.<br>
<br>
I don't know enough of the magic that is BOOST_PP_CONFIG_FLAGS to know<br>
why it's following that path -- maybe your clang is configured in such<br>
a way that Boost thinks that it's MSVC++ -- but Clang doesn't have<br>
complete emulation of MSVC++ quirks, so if that's the case I'm not<br>
shocked that this isn't working.</blockquote><div><br></div><div>As it happens, we do support this quirk, but it's so quirky that it's an error by default even in Microsoft mode. One could use -Wno-invalid-token-paste to disable the diagnostic (with MS-style behavior for the result), but I have no idea whether there are other things MSVC mode might enable which we actually don't support.</div>
</div>