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:
@@ -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:
|
||||
|
||||
@@ -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 += '>';
|
||||
|
||||
Reference in New Issue
Block a user