[C++-sig] call policies help needed
Roman Yakovenko
roman.yakovenko at gmail.com
Wed May 24 14:24:08 CEST 2006
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, then pyplusplus will expose member
variable "a",
using get/set functions
Thus, I provide some form of safeness + developer will be less surprised.
2. In any other case, the user will be forced to set call policies.
Comment will contain link
to this thread :-).
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
More information about the Cplusplus-sig
mailing list