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<void(int)> func) { do some code to print its name. } int main() { boost::function<void(int)> voidint voidint = &somefunc; printfuncname(func); } Thanks...
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<void(int)> func) { do some code to print its name. }
int main() { boost::function<void(int)> 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 <dave@boost-consulting.com> wrote:
"chun ping wang" <cablepuff@gmail.com> 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 <cablepuff@gmail.com> wrote:
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 <dave@boost-consulting.com> wrote:
"chun ping wang" <cablepuff@gmail.com> 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