Hello,
I need help again.
In the example below I either get the error message during compilation:
> ...
>/home/mihail/temporary/boost_1_37_0/boost/python/object/value_holder.hpp:66:
>error: cannot declare field
>‘boost::python::objects::value_holder::m_held’ to be of abstract type ‘A0’
>boost.cp
> >implicitly_convertible();
> >implicitly_convertible();
> >}
> I see that an int can be implicitly converted to X. But how can an X be
> converted to an int? I can't believe that boost.python searches all
> implemented
> functions to find that make_x is capable of converting an int to
> Roman Yakovenko wrote:
>
> It is not a good idea. Python string is immutable. May be you should
> consider custom converter.
> http://www.boost.org/doc/libs/1_37_0/libs/python/doc/v2/faq.html#custom_string
I don't see why it is not a good idea. I am nowhere accessing any string
derived classe
Dear all,
thanks a lot for your immediate responses that lead to a fast solution for my
previous problem.
Here comes the next one.
In the example below both classes A and B are derived from std::string. Class B
can be implicitly converted to A by means of 'B::operator const A()'. So the
functi
> try use boost::noncopyable to B or implemente a copy constructor in B
> without call A copy contructor.
Thank you. This works:
BOOST_PYTHON_MODULE(boost_ext)
{
class_ a("A",init<>());
class_, boost::noncopyable >("B",init<>());
}
One more question about the syntax. You cited
http://ww
> Stefan Seefeld wrote:
>
> In this case you want to tell Python that your object is non-copyable:
I followed your suggestion and still get the same error message:
boost.cpp:6: error: ‘A::A(const A&)’ is private
(full bjam output is appended to this email)
Could you check this modified code? bo
Sorry, the public A::A() constructor was missing. The corrected class A, which
caused the described problem, is:
class A{
private:
A(const A&){}; //no public copy constructor
public:
A(){};
};
___
Cplusplus-sig mailing list
Cplusplus-sig@
Hello,
I am still in the early process of learning boost.python.
I have reduced my problem to the following code:
#include
using namespace boost::python;
class A{
private:
A(const A&){}; //no public copy constructor
};
class B: public A{
public:
B(){};
};
BOOST_PYTHON_MODULE(boost_ext)
{
> If I understand right SWIG feature, it allows you to define something
> like "call policy" which is invoked before and after function
> invocation, and it also allows you to define complex mapping between
> Python and C++ arguments. So you can define it once, and then apply it
> when needed.
Yes
AIL PROTECTED]>
An: Development of Python/C++ integration
Gesendet: Sonntag, den 30. November 2008, 20:29:41 Uhr
Betreff: Re: [C++-sig] Pyste,Py++: equivalent of swig typemaps?
Mihail Konstantinov wrote:
> Hello,
> due to limitations of swig I am currently learning Py++ and Pyste (because i
Hello,
due to limitations of swig I am currently learning Py++ and Pyste
(because it seems currently to be better documented than Py++).
Does Pyste or Py++ offer typemaps like swig
(http://www.swig.org/Doc1.3/SWIGDocumentation.html#Python_nn53) that
allow any sequence of input arguments to be wrap
11 matches
Mail list logo