[C++-sig] Re: Construct for c++ class with reference

David Abrahams dave at boost-consulting.com
Tue Apr 20 18:50:17 CEST 2004


"Neal D. Becker" <ndbecker2 at verizon.net> writes:

> How should I wrap this (simplified example):
>
> struct X {
>   X (int& _x) : x (_x) {}
>   int& x;
> };

References to builtins are a difficult case.  If it were a class you
could use a read_write property.  Python ints are immutable, so you
have to decide how you'd like to see this translated.  What do you
want the Python interface to be?

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com





More information about the Cplusplus-sig mailing list