Handle references to functions

This commit is contained in:
Peter Dimov
2021-10-05 05:01:05 +03:00
parent 5e382efa84
commit 36cec9a5cc

View File

@ -332,6 +332,22 @@ template<class T> std::string type_name( tn_identity<T*> )
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
// function references
template<class R, class... A> std::string type_name( tn_identity<R(&)(A...)> )
{
return type_name( tn_identity<R>() ) + "(&)(" + tn_add_each<A...>() + ')';
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<class R, class... A> std::string type_name( tn_identity<R(&&)(A...)> )
{
return type_name( tn_identity<R>() ) + "(&&)(" + tn_add_each<A...>() + ')';
}
#endif
// function pointers
template<class R, class... A> std::string type_name( tn_identity<R(*)(A...)> )