From 2b52f157aeded74d6b4234ce72b4f2977872ddce Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Fri, 11 Oct 2013 13:51:53 +0400 Subject: [PATCH] Patch for Boost.Test that allows compilation of tests with RTTI disabled --- boost_test_no_rtti.patch | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 boost_test_no_rtti.patch diff --git a/boost_test_no_rtti.patch b/boost_test_no_rtti.patch new file mode 100644 index 0000000..f022315 --- /dev/null +++ b/boost_test_no_rtti.patch @@ -0,0 +1,44 @@ +Index: trunk/boost/test/execution_monitor.hpp +=================================================================== +--- trunk/boost/test/execution_monitor.hpp (revision 86235) ++++ trunk/boost/test/execution_monitor.hpp (working copy) +@@ -261,7 +261,7 @@ + template + void erase_exception_translator( boost::type* = 0 ) + { +- m_custom_translators = m_custom_translators->erase( m_custom_translators ); ++ m_custom_translators = m_custom_translators->template erase( m_custom_translators ); + } + + private: +Index: trunk/boost/test/tree/test_case_template.hpp +=================================================================== +--- trunk/boost/test/tree/test_case_template.hpp (revision 86235) ++++ trunk/boost/test/tree/test_case_template.hpp (working copy) +@@ -34,8 +34,13 @@ + #include + #include + ++#ifndef BOOST_NO_RTTI ++#include // for typeid ++#else ++#include ++#endif ++ + // STL +-#include // for typeid + #include // for std::string + #include // for std::list + +@@ -77,7 +82,11 @@ + std::string full_name; + assign_op( full_name, m_test_case_name, 0 ); + full_name += '<'; ++#ifndef BOOST_NO_RTTI + full_name += typeid(TestType).name(); ++#else ++ full_name += BOOST_CURRENT_FUNCTION; ++#endif + if( boost::is_const::value ) + full_name += " const"; + full_name += '>';