[C++-sig] Protected destructor compile error

Roman Yakovenko roman.yakovenko at gmail.com
Thu Jun 22 21:12:32 CEST 2006


On 6/22/06, David Abrahams <dave at boost-consulting.com> wrote:
> Boost.Python assumes that a const reference argument means that the
> function can accept "rvalues", e.g. objects implicitly converted from
> other python types.

I am sure I am missing something trivial.

Why Boost.Python does such assumption? In my opinion Boost.Python, in this case
does not have to make any assumption.

If user want to enjoy from conversion he should register it, right? He
does this using:

1. implicitly_convertible
2. register_ptr_to_python
3. class_::bases

If none of those has been used, Boost.Python can safely assume that
the class could not be built from other python types.

Would you mind to explain, please?

Thank you.

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



More information about the Cplusplus-sig mailing list