mirror of
https://github.com/boostorg/core.git
synced 2025-07-29 20:37:22 +02:00
Handle references to functions
This commit is contained in:
@ -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...)> )
|
||||
|
Reference in New Issue
Block a user