[C++-sig] custom smart pointers
David Abrahams
dave at boost-consulting.com
Mon Sep 18 23:17:29 CEST 2006
"Roman Yakovenko" <roman.yakovenko at gmail.com> writes:
> Python test code also simple:
>
> inst = cspc_ext.derived_t()
> cspc_ext.val_get_value(inst)
> cspc_ext.const_ref_get_value(inst) # <= in this line I get segmentation fault.
AFAICT this example doesn't work as packaged (the Jamroot doesn't look for
test.py).
Your smart pointer is buggy; it has only a default copy ctor. The
enclosed works.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cspc.cpp
Type: text/x-c++src
Size: 3043 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060918/5f025154/attachment.cpp>
-------------- next part --------------
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list