Mihail Konstantinov wrote:
One more question about the syntax. You cited
http://www.boost.org/doc/libs/1_37_0/libs/python/doc/v2/class.html#class_-spec
which specifies the syntax as "class_"
so that I thought I have to include all 4 template arguments. But when
I used instead of the above (wor
> 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
Mihail Konstantinov wrote:
gcc.compile.c++ bin/gcc-4.1.2/debug/boost.o
boost.cpp: In copy constructor ‘B::B(const B&)’:
As this error message suggests: as B derives from A, it is (by default)
non-copyable, too. That you have to tell python, too, thus:
class_ a("A", init<>);
class_, nonco
On Tue, Dec 2, 2008 at 4:11 PM, Renato Araujo <[EMAIL PROTECTED]> wrote:
> try use boost::noncopyable to B or implemente a copy constructor in B
> without call A copy contructor.
He is right. The following code was generated by Py++:
#include "boost/python.hpp"
namespace bp = boost::python;
BOO
Mihail Konstantinov wrote:
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:
[snip]
/home/mihail/temporary/boost_1_37_0/boost/python/object/value_holder.hpp: In constructor
‘boost
try use boost::noncopyable to B or implemente a copy constructor in B
without call A copy contructor.
BR
On Tue, Dec 2, 2008 at 11:03 AM, Mihail Konstantinov
<[EMAIL PROTECTED]> wrote:
>> Stefan Seefeld wrote:
>
>>
>> In this case you want to tell Python that your object is non-copyable:
>
> I
> 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
Mihail Konstantinov wrote:
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_PY
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)
{
10 matches
Mail list logo