[C++-sig] add_property + return value policy

F. Oliver Gathmann gathmann at cenix-bioscience.com
Fri Nov 12 17:10:01 CET 2004


Neal D. Becker wrote:

>Is it possible to .add_property with a member function that needs a
>return_value_policy (e.g, copy_const_reference)?
>  
>
You can try make_function - something along the lines of

.add_property("myprop", 
              make_function(&getter, return_value_policy<copy_const_reference>()),
              &setter)


HTH,

Oliver

-- 
--------------------------------------------------------------------
F. Oliver Gathmann, Ph.D.
Director IT Unit
Cenix BioScience GmbH
Tatzberg 47                       phone: +49 (351) 4173-136
D-01307 Dresden, Germany          fax:   +49 (351) 4173-198

fingerprint: 8E0E 9A64 A07E 0D1A D302  34C2 421A AE9F 4E13 A009
public key: http://www.cenix-bioscience.com/public_keys/gathmann.gpg
--------------------------------------------------------------------





More information about the Cplusplus-sig mailing list