
10 May
2006
10 May
'06
7 a.m.
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