Opened 8 years ago

Closed 8 years ago

#11173 closed Bugs (worksforme)

numeric/odeint does not observe BOOST_NO_RTTI, BOOST_NO_TYPEID

Reported by: noe casas <noe.casas@…> Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost Development Trunk Severity: Problem
Keywords: rtti, typeid Cc:

Description

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.

Environment --------------------------------

  • Ubuntu 14.04
  • g++ 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
  • boost 1.54 (although the code is the same in trunk as of today)

Compilation error --------------------------

In file included from /usr/include/boost/math/special_functions/gamma.hpp:21:0,

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:

/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

msg += (boost::format(function) % typeid(T).name()).str();

/usr/include/boost/math/policies/error_handling.hpp: In function ‘void boost::math::policies::detail::raise_error(const char*, const char*, const T&)’: /usr/include/boost/math/policies/error_handling.hpp:107:45: error: cannot use typeid with -fno-rtti

msg += (boost::format(function) % typeid(T).name()).str();

Change History (1)

comment:1 by John Maddock, 8 years ago

Resolution: worksforme
Status: newclosed

This was fixed in Boost-1.56.

Note "trunk" refers to the svn repository which is now dead - we've moved to Github: https://github.com/boostorg/math

Note: See TracTickets for help on using tickets.