Re: [C++-sig] newbie questions...
I just checked in a slightly modified version of the code in my previous message; boost/libs/python/example/std_pair.cpp. It would be nice if someone more familiar with bjam could help with the Jamfile. A possible test_std_pair.py: import std_pair_ext assert std_pair_ext.foo() == (3,5) print "OK" --- "Ralf W. Grosse-Kunstleve" <rwgk@yahoo.com> wrote:
--- Marco Correia <mvc@di.fct.unl.pt> wrote:
the std::pair<T1,T2> to a python tuple. I've learned that I cannot have bindings for c++ templates, so lets say that T1=T2=int.
Here you go (tested with g++ 3.2.3):
#include <boost/python/module.hpp> ...
__________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
"Ralf W. Grosse-Kunstleve" <rwgk@yahoo.com> writes:
It would be nice if someone more familiar with bjam could help with the Jamfile.
Just follow the exact pattern used for the other examples in libs/python/example/Jamfile.
A possible test_std_pair.py:
import std_pair_ext assert std_pair_ext.foo() == (3,5) print "OK"
-- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
David Abrahams -
Ralf W. Grosse-Kunstleve