1
0
forked from boostorg/core

Support pointers to members

This commit is contained in:
Peter Dimov
2021-10-05 07:25:35 +03:00
parent b0b48c5783
commit cd1a8fd238
2 changed files with 41 additions and 1 deletions
+19 -1
View File
@@ -350,7 +350,18 @@ template<class R, class... A> std::string function_type_name( tn_identity<R(A...
if( !suffix.empty() )
{
r += '(' + suffix + ')';
r += '(';
if( suffix.front() == ' ' )
{
r += suffix.substr( 1 );
}
else
{
r += suffix;
}
r += ')';
}
r += '(' + tn_add_each<A...>() + ')';
@@ -580,6 +591,13 @@ template<class T, std::size_t N> std::string type_name( tn_identity<T const vola
return array_type_name( tn_identity<T const volatile[N]>(), suffix );
}
// pointers to members
template<class R, class T> std::string type_name( tn_identity<R T::*>, std::string const& suffix )
{
return type_name( tn_identity<R>(), ' ' + type_name( tn_identity<T>(), "" ) + "::*" + suffix );
}
// nullptr_t
#if !defined(BOOST_NO_CXX11_NULLPTR)