[C++-sig] copy_const_reference or return_internal_reference?

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Tue Sep 24 23:54:51 CEST 2002


I have an object composed of 12 double. A const& to this object is returned by
a member function of another class. From the viewpoint of using the returned
object in Python I do not care if I get a copy or a reference to the returned
object. In Boost.Python Version 2 I have the choice of using
copy_const_reference or return_internal_reference. Are there considerations
that would lead me to prefer one over the other, such as size of generated code
or memory overhead?

Thanks,
        Ralf


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com




More information about the Cplusplus-sig mailing list