getting name of function from boost::function

Hmm i have a question, are there ways to get names of the function from
boost::function..
example i have
void printfuncname(boost::function

chun ping wang wrote:
Hmm i have a question, are there ways to get names of the function from boost::function..
example i have
void printfuncname(boost::function
func) { do some code to print its name. } int main() { boost::function
voidint voidint = &somefunc; printfuncname(func); }
This is not possible, because: 1. Boost.Function object might not correspond to a function at all, but to a function object passed though boost::bind. 2. Even if it corresponds to a function, getting the name is only possible using debug information, and it might not be available, and there's no portable lib to access debug information - Volodya

hmm than is there anyway to get the names of the function if it is not
passed as bind..i.e. like the paramter is void someone(int); f = &someone;
On 5/10/06, David Abrahams
"chun ping wang"
writes: Hmm i have a question, are there ways to get names of the function from boost::function..
Nope, sorry.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

lol oh well.. guess i can always use Boost.python to get the name of the
parameter passed in ..sigh....
On 5/10/06, chun ping wang
hmm than is there anyway to get the names of the function if it is not passed as bind..i.e. like the paramter is void someone(int); f = &someone;
On 5/10/06, David Abrahams
wrote: "chun ping wang"
writes: Hmm i have a question, are there ways to get names of the function from boost::function..
Nope, sorry.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
chun ping wang
-
David Abrahams
-
Vladimir Prus