Boost C++ Libraries: Ticket #7053: lexical_cast and gtest https://svn.boost.org/trac10/ticket/7053 <p> Hello. </p> <p> VS 2005 SP1<br /> googletest compiled with 'GTEST_USE_OWN_TR1_TUPLE=0'<br /> I use Boost 1.48 - ok<br /> If i switch to 1.50:<br /> </p> <pre class="wiki">#include "stdafx.h" #include &lt;gtest/gtest.h&gt; #include &lt;boost/lexical_cast.hpp&gt; int _tmain(int argc, _TCHAR* argv[]) { return 0; } </pre><p> error C2146: syntax error : missing ';' before identifier 'BOOST_NO_MACRO_EXPAND'<br /> error C2433: 'fpclassify_imp' : 'inline' not permitted on data declarations<br /> error C2065: 'T' : undeclared identifier<br /> error C2146: syntax error : missing ')' before identifier 't'<br /> error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br /> error C2059: syntax error : ')'<br /> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7053 Trac 1.4.3 anonymous Tue, 03 Jul 2012 03:17:44 GMT attachment set https://svn.boost.org/trac10/ticket/7053 https://svn.boost.org/trac10/ticket/7053 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">lexical_case_failure.zip</span> </li> </ul> <p> simple VS 2005 project exposing same issue without gtest </p> Ticket Antony Polukhin Thu, 05 Jul 2012 19:15:57 GMT owner, component, severity, milestone changed; cc set https://svn.boost.org/trac10/ticket/7053#comment:1 https://svn.boost.org/trac10/ticket/7053#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">antoshkka@…</span> added </li> <li><strong>owner</strong> changed from <span class="trac-author">Antony Polukhin</span> to <span class="trac-author">John Maddock</span> </li> <li><strong>component</strong> <span class="trac-field-old">lexical_cast</span> → <span class="trac-field-new">math</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Showstopper</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.51.0</span> </li> </ul> <p> Build failure is caused by adding boost/tr1/tr1 to compiler's include search path.<br /> Reproduced it on gcc: </p> <pre class="wiki">In file included from ../../trunk/boost/math/complex/details.hpp:20:0, from ../../trunk/boost/math/complex/asin.hpp:9, from ../../trunk/boost/math/complex.hpp:10, from ../../trunk/boost/tr1/complex.hpp:13, from ../../trunk/boost/tr1/tr1/complex:28, from ../../trunk/boost/math/special_functions/math_fwd.hpp:31, from ../../trunk/boost/math/special_functions/sign.hpp:17, from ../../trunk/boost/lexical_cast.hpp:153, from ../../trunk/libs/conversion/test/lexical_cast_arrays_test.cpp:11: ../../trunk/boost/math/special_functions/fpclassify.hpp:123:27: error: expected initializer before 'BOOST_NO_MACRO_EXPAND' </pre><p> Looks more like a boost::math or boost::tr1 library bug </p> Ticket John Maddock Wed, 11 Jul 2012 17:27:31 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7053#comment:2 https://svn.boost.org/trac10/ticket/7053#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/79420" title="Fix double inclusion of &lt;complex&gt; which causes use of Boost.TR1 to ...">[79420]</a>) Fix double inclusion of &lt;complex&gt; which causes use of Boost.TR1 to fail. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7053" title="#7053: Bugs: lexical_cast and gtest (closed: fixed)">#7053</a>. </p> Ticket John Maddock Thu, 02 Aug 2012 11:59:16 GMT milestone changed https://svn.boost.org/trac10/ticket/7053#comment:3 https://svn.boost.org/trac10/ticket/7053#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.51.0</span> → <span class="trac-field-new">Boost 1.52.0</span> </li> </ul> Ticket