[C++-sig] Policies again
Piotr Jaroszynski
p.jaroszynski at gmail.com
Wed May 2 22:56:51 CEST 2007
Hello,
I am still not the best at polcies...
Let me show you my current problem:
#include <boost/python.hpp>
namespace bp = boost::python;
struct Blah;
struct Foo {
Blah * b;
Foo(Blah * blah) : b(blah) { }
};
struct Blah {
Foo * f;
Blah() : f(new Foo(this)) { }
};
BOOST_PYTHON_MODULE(policies)
{
bp::class_<Foo> f("Foo", bp::no_init);
bp::class_<Blah> b("Blah");
b.add_property("f", bp::make_getter(&Blah::f, policy??));
}
Which policy should I use in such case?
--
Best Regards,
Piotr Jaroszynski
More information about the Cplusplus-sig
mailing list