sig-bounces+wladwig=wdtinc@python.org
> [cplusplus-sig-bounces+wladwig=wdtinc@python.org] On Behalf Of Hans
> Roessler
> [hansroess...@yahoo.de]
> Sent: Monday, May 25, 2009 9:08 AM
> To: cplusplus-sig@python.org
> Subject: [C++-sig] wrapping operator=
>
> He
Hello!
I want to wrap with boost.python a C++ class "DataCube" which has overloaded
the operator=.
The constructor DataCube::DataCube(double x) allocates huge amounts of memory
and fills it with x's.
The DataCube::operator=(double x) just overwrites the already allocated memory
with x's.
No
How can I iterate in C++ over a boost::python::list?
According to http://www.boost.org/doc/libs/1_39_0/libs/python/doc/v2/list.html
it has no begin() and end() functions.
Neither a size() function that would allow to call pop(size()-1). Neither an
isEmpty() function that would allow to call pop
Thanks, ".def("info", (void(A::*)(int))0, A_info_overloads());" does it.
Could somebody explain what the meaning of this "(void(A::*)(int))0" construct
is? Is it a function pointer? Why the 0?
(Just now I am fine with the proposed solution, but if I even understand it,
you will read fewer stupi
Hello,
I try to wrap a class with a function info([int arg]) that takes either zero or
one argument (exact colde below). For some reason I can't get
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS to work.
The examples at
http://www.boost.org/doc/libs/1_39_0/libs/python/doc/tutorial/doc/html/python/fun
, B) without B::B() default constructor in
> boost.python
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hans Roessler schrieb:
>
> Hello Hans,
>
> in my experience .def(self+other) often didn't quite do what I expected.
> You could try somet
Hello,
how can I wrap the following overloaded operator+ using boost.python?
The code as is fails with
>...
>pytest.cpp: In function ‘void init_module_pytest()’:
>pytest.cpp:19: error: expected primary-expression before ‘(’ token
>...
If I try ".def(self+B())" instead of ".def(self+other())", the