[C++-sig] With boost python tuple, how to loop over tuple items?

Jones, Torrin A (US) torrin.jones at baesystems.com
Thu Jan 30 09:39:03 EST 2020


If I remember correctly there is a len() function on the boost::python::object class.

len() is documented at the bottom of this page . . .

https://www.boost.org/doc/libs/1_66_0/libs/python/doc/html/reference/object_wrappers/boost_python_object_hpp.html

I can’t help with the ambiguity.


From: Cplusplus-sig <cplusplus-sig-bounces+torrin.jones=baesystems.com at python.org> On Behalf Of HOUSSEN Franck
Sent: Wednesday, January 29, 2020 1:02 PM
To: cplusplus-sig at python.org
Subject: [C++-sig] With boost python tuple, how to loop over tuple items?

*** WARNING ***
EXTERNAL EMAIL -- This message originates from outside our organization.

With boost python tuple, how to loop over tuple items? In dummy.cpp attached, I'd like to get line 8 to work. Afterwards, I noticed line 7 does not even compile. How to get the length of a tuple (line 8), and, why there could be some ambiguity (line 7). Any help / clue is appreciated.
Franck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20200130/11ac6ffa/attachment.html>


More information about the Cplusplus-sig mailing list