Re: [C++-sig] Boost-python wrapping a vector of vectors?

2010-01-06 Thread troy d. straszheim
Tim Couper wrote: I'm trying to boost-python a vector-of-vectors, like class A { public A(const std::vector>& my_array); }; and would intuitively write the wrapper: BOOST_PYTHON_MODULE(foo) { using namespace boost::python class_("A") .def(init(std::vector >()) ; but get the error

[C++-sig] Boost-python wrapping a vector of vectors?

2010-01-06 Thread Tim Couper
I'm trying to boost-python a vector-of-vectors, like class A { public A(const std::vector>& my_array); }; and would intuitively write the wrapper: BOOST_PYTHON_MODULE(foo) { using namespace boost::python class_("A") .def(init(std::vector >()) ; but get the error "a call to a const

Re: [C++-sig] boost 1.41 and autolink (maybe the wrong list)

2010-01-06 Thread Nicolas Lelong
> I haven’t done any linking at this point – I am just trying to compile. Yep, but the compiler has predefined macros defined, and the auto_link header tries to prevent linking / crashing problems. You should try to compile using an addition /MD switch to use the dynamically linked C-runtime.

Re: [C++-sig] Implementation of proper overload resolution

2010-01-06 Thread Renato Araujo
This is great, I will try this, but I'm afraid about the size, because my main problem with boost.python is the library size compared to others c++ python bindings, my current library has 16 MB compared to 5 MB from SIP, and in my bindings I have a lot of overload functions and this solution can p

Re: [C++-sig] Avoid Implicitly conversion for non direct conversion

2010-01-06 Thread Hans Meine
Am Mittwoch, 06. Januar 2010 14:10:02 schrieb Renato Araujo: > On Wed, Jan 6, 2010 at 4:59 AM, Hans Meine wrote: > > But only if you pass objects that need to be converted, right? > > Yes but this is the user level I would like to avoid this. Ah, you fear users saying "PySide is slow" because the

Re: [C++-sig] function types as user-defined converters

2010-01-06 Thread troy d. straszheim
Ravi wrote: On Friday 06 November 2009 14:52:49 troy d. straszheim wrote: Currently, the converter type still leaks out to python in the signature: class S(Boost.Python.instance) | add(...) | add( (S)arg1, (object)arg2) -> None : | | C++ signature :

Re: [C++-sig] Avoid Implicitly conversion for non direct conversion

2010-01-06 Thread troy d. straszheim
Renato Araujo wrote: Hi guys, I'm trying use the "implicitly_convertible" to specify to boost.python the possible conversions for every type, but I start get some errors in my functions call because, the boost.python accept conversions in more then one level. Like in this code: The boost.pytho

Re: [C++-sig] Avoid Implicitly conversion for non direct conversion

2010-01-06 Thread Renato Araujo
Hi thanks for you help, On Wed, Jan 6, 2010 at 4:59 AM, Hans Meine wrote: > On Dienstag 05 Januar 2010, Renato Araujo wrote: >> I would like to know if is possible to avoid this level of conversion >> and tell to boost.python only try the direct conversion, > > Not as far as I know. > >> because

Re: [C++-sig] boost 1.41 and autolink (maybe the wrong list)

2010-01-06 Thread Simon Pickles
Hello Terry, Try this: .sconf_temp\conftest_4.cpp: #define BOOST_PYTHON_DYN_LINK #include "boost/python.hpp" This will make boost look for shared library in the autolink feature Si On 06/01/2010 06:50, terry.rank...@csiro.au wrote: I have compiled boost, and now want to use it in m

Re: [C++-sig] Avoid Implicitly conversion for non direct conversion

2010-01-06 Thread Hans Meine
On Dienstag 05 Januar 2010, Renato Araujo wrote: > I would like to know if is possible to avoid this level of conversion > and tell to boost.python only try the direct conversion, Not as far as I know. > because this > make the functions call slower then normal calls, But only if you pass objec