2
0
mirror of https://github.com/boostorg/test.git synced 2026-01-27 19:32:11 +00:00

Make Boost.Test work with RTTI disabled (fixes #9228)

This commit is contained in:
Antony Polukhin
2014-01-11 19:19:20 +04:00
parent 1c4d277355
commit fcd4da81d1
2 changed files with 12 additions and 3 deletions

View File

@@ -261,7 +261,7 @@ public:
template<typename ExceptionType>
void erase_exception_translator( boost::type<ExceptionType>* = 0 )
{
m_custom_translators = m_custom_translators->erase<ExceptionType>( m_custom_translators );
m_custom_translators = m_custom_translators->template erase<ExceptionType>( m_custom_translators );
}
private:

View File

@@ -34,8 +34,13 @@
#include <boost/type_traits/is_const.hpp>
#include <boost/function/function0.hpp>
// STL
#ifndef BOOST_NO_RTTI
#include <typeinfo> // for typeid
#else
#include <boost/current_function.hpp>
#endif
// STL
#include <string> // for std::string
#include <list> // for std::list
@@ -77,7 +82,11 @@ struct generate_test_case_4_type {
std::string full_name;
assign_op( full_name, m_test_case_name, 0 );
full_name += '<';
full_name += typeid(TestType).name();
#ifndef BOOST_NO_RTTI
full_name += typeid(TestType).name();
#else
full_name += BOOST_CURRENT_FUNCTION;
#endif
if( boost::is_const<TestType>::value )
full_name += " const";
full_name += '>';