[C++-sig] call policies help needed

Roman Yakovenko roman.yakovenko at gmail.com
Wed May 24 19:07:07 CEST 2006


On 5/24/06, David Abrahams <dave at boost-consulting.com> wrote:
> "Roman Yakovenko" <roman.yakovenko at gmail.com> writes:
>
> > On 5/24/06, David Abrahams <dave at boost-consulting.com> wrote:
> >> In principle the C++ code has unsafety built into it, since a B object
> >> can always outlive an A object.  There's no safe choice with expected
> >> behavior that you can derive merely by looking at C++ declarations;
> >> you need to analyze the semantics of the C++ code, which might lead
> >> you to discover that there's no way to get both safety and expected
> >> behavior for this interface.
> >
> > Thanks. I understood this. I think I will implement next behaviour:
> >
> > 1. If "a" could be return by value,
>
> You mean if it has a public copy ctor?

Yes, but this is not enough, class should not be abstract. Should have public
destructor.

> > then pyplusplus will expose member variable "a", using get/set
> > functions
>
> Meaning what, precisely?
>
>         >>> b.get_a()
>         >>> b.set_a()
>

Yes.

> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list