Boost C++ Libraries: Ticket #11173: numeric/odeint does not observe BOOST_NO_RTTI, BOOST_NO_TYPEID https://svn.boost.org/trac10/ticket/11173 <p> Compiling code that uses odeint with g++ using -fno-rtti gives an error due to the use of typeid in math/policies/error_handling.hpp, despite me having defined BOOST_NO_RTTI and BOOST_NO_TYPEID. </p> <p> Environment -------------------------------- </p> <ul><li>Ubuntu 14.04 </li><li>g++ 4.8.2 (Ubuntu 4.8.2-19ubuntu1) </li><li>boost 1.54 (although the code is the same in trunk as of today) </li></ul><p> Compilation error -------------------------- </p> <blockquote> <p> In file included from /usr/include/boost/math/special_functions/gamma.hpp:21:0, </p> <blockquote> <p> from /usr/include/boost/math/special_functions/factorials.hpp:13, from /usr/include/boost/math/special_functions/binomial.hpp:13, from /usr/include/boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp:30, from /usr/include/boost/numeric/odeint.hpp:45, from model.cpp:5: </p> </blockquote> <p> /usr/include/boost/math/policies/error_handling.hpp: In function ‘void boost::math::policies::detail::raise_error(const char*, const char*)’: /usr/include/boost/math/policies/error_handling.hpp:90:45: error: cannot use typeid with -fno-rtti </p> <blockquote> <p> msg += (boost::format(function) % typeid(T).name()).str(); </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost/math/policies/error_handling.hpp: In function ‘void boost::math::policies::detail::raise_error(const char*, const char*, const T&amp;)’: /usr/include/boost/math/policies/error_handling.hpp:107:45: error: cannot use typeid with -fno-rtti </p> <blockquote> <p> msg += (boost::format(function) % typeid(T).name()).str(); </p> </blockquote> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11173 Trac 1.4.3 John Maddock Wed, 08 Apr 2015 17:39:04 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11173#comment:1 https://svn.boost.org/trac10/ticket/11173#comment:1 <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">worksforme</span> </li> </ul> <p> This was fixed in Boost-1.56. </p> <p> Note "trunk" refers to the svn repository which is now dead - we've moved to Github: <a class="ext-link" href="https://github.com/boostorg/math"><span class="icon">​</span>https://github.com/boostorg/math</a> </p> Ticket