<div class="gmail_quote">On Wed, Jul 18, 2012 at 6:35 PM, Shang Yu <span dir="ltr"><<a href="mailto:yusunn@gmail.com" target="_blank">yusunn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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></blockquote><div><br></div><div><div>E:\SRC\LIBS\boost_1_49_0\boost/mpl/next_prior.hpp:44:1: error: pasting formed</div><div> 'BOOST_PP_TUPLE_ELEM_E_3(', an invalid preprocessing token</div>
<div> [-Winvalid-token-paste]</div><div>BOOST_MPL_AUX_NA_SPEC(1, next)</div><div>^</div><div>E:\SRC\LIBS\boost_1_49_0\boost/mpl/aux_/na_spec.hpp:161:40: note: expanded from</div><div> macro 'BOOST_MPL_AUX_NA_SPEC'</div>
<div>#define BOOST_MPL_AUX_NA_SPEC(i, name) \</div><div> ^</div><div>E:\SRC\LIBS\boost_1_49_0\boost/mpl/aux_/na_spec.hpp:154:47: note: expanded from</div><div> macro '\</div>
<div>BOOST_MPL_AUX_NA_SPEC_NO_ETI'</div><div>#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \</div><div> ^</div></div><div><br></div><div>Well, there's a bug in this diagnostic: we're including the \<newline> in the name of the macro. Not related to the issue at hand, of course...</div>
<div><br></div><div>The real problem here is a boost bug. boost/preprocessor/config/config.hpp is determining that the compiler is MSVC, and consequently feeding us this non-conforming code:</div><div><br></div><div><div>
E:\SRC\LIBS\boost_1_49_0\boost/preprocessor/tuple/elem.hpp:36:114: note:</div><div> expanded from macro 'BOOST_PP_TUPLE_ELEM'</div><div> ...n), BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size), tuple))</div>
<div> ^</div></div></div>