[C++-sig] "pass all args in list" syntax
by Gennadiy Rozental other posts by this author
Oct 8 2009 11:25PM messages near this date
[C++-sig] [Urgent Question] Import Qt builded Lib into python with Boost.python
|
Re: [C++-sig] "pass all args in list" syntax
Hi,
In native Python I can do something like this:
def goo(a,b,c):
return a+b+c
ll = [1,2,3]
goo( *ll )
And it will pass all the arguments properly. I need similar functionality in C++:
Given
bp::object func;
bp::list args;
I'd like to invoke the function like this func( *args );
Is there syntax in Boost.Python to achieve this? Or I need to resort to ugly
switch statement?
Gennadiy
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@[...].org
http://mail.python.org/mailman/listinfo/cplusplus-sig
Thread:
Gennadiy Rozental
Stefan Seefeld
Gennadiy Rozental
Stefan Seefeld
|