mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
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:
parent
dccc50d3e9
commit
c2dd320bf4
2 changed files with 33 additions and 46 deletions
|
|
@ -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 ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue