Fixed type name extraction involving template classes

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@593 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2013-01-27 21:54:41 +00:00
parent dccc50d3e9
commit c2dd320bf4
2 changed files with 33 additions and 46 deletions

View file

@ -8,7 +8,6 @@
#include <turtle/detail/type_name.hpp>
#include <boost/test/auto_unit_test.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/lexical_cast.hpp>
namespace
@ -16,12 +15,7 @@ namespace
template< typename T >
std::string to_string( const T& )
{
std::string result = boost::lexical_cast< std::string >( mock::detail::type_name( BOOST_SP_TYPEID( T ) ) );
boost::algorithm::replace_all( result, "& ", "&" );
boost::algorithm::replace_all( result, " &", "&" );
boost::algorithm::replace_all( result, "* ", "*" );
boost::algorithm::replace_all( result, " *", "*" );
return result;
return boost::lexical_cast< std::string >( mock::detail::type_name( BOOST_SP_TYPEID( T ) ) );
}
}