Updated docs and removed applied patch

This commit is contained in:
Antony Polukhin
2014-05-07 15:29:52 +04:00
parent 7ba3f29da1
commit 6931c1de4c
5 changed files with 127 additions and 105 deletions

View File

@@ -1,58 +0,0 @@
From fcd4da81d14847272fa888f4e9a54930b48ee95b Mon Sep 17 00:00:00 2001
From: Antony Polukhin <antoshkka@gmail.com>
Date: Sat, 11 Jan 2014 19:19:20 +0400
Subject: [PATCH] Make Boost.Test work with RTTI disabled (fixes #9228)
---
include/boost/test/execution_monitor.hpp | 2 +-
include/boost/test/tree/test_case_template.hpp | 13 +++++++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/include/boost/test/execution_monitor.hpp b/include/boost/test/execution_monitor.hpp
index f6b7681..259f97c 100644
--- a/include/boost/test/execution_monitor.hpp
+++ b/include/boost/test/execution_monitor.hpp
@@ -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:
diff --git a/include/boost/test/tree/test_case_template.hpp b/include/boost/test/tree/test_case_template.hpp
index 9f7466a..b0fa634 100644
--- a/include/boost/test/tree/test_case_template.hpp
+++ b/include/boost/test/tree/test_case_template.hpp
@@ -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 += '>';
--
1.8.5.3