[C++-sig] Re: std::complex<double>?

David Abrahams dave at boost-consulting.com
Sat Jan 10 03:10:50 CET 2004


"Neal D. Becker" <nbecker at hns.com> writes:

> I'm still confused.
>
> Let's try 1 thing at a time.  Forget about complex<int> for now.
>
> All I want, is to write C++ algorithms that use 
> std::vector< std::complex<double> > as arguments.  I want to 
>
> 1. pass such data from python -> c++.
> 2. read elements of data in python (e.g. print v[i])
> 3. write elements from python (e.g., v[i] = 10)
>
> So, what I need is probably not surprising.  What do I need to do?

As far as I can tell from the docs, you need to pass true in the
NoProxy parameter slot of the vector indexing suite.  But I'm not an
expert on the indexing suite stuff, which is why I've been trying to
get Joel and Raoul to answer this.  

Incidentally, Joel, NoProxy is listed twice in the template parameters
for indexing_suite, and green was meant to be used in the
documentation for class_<...> only to indicate that template
parameters could appear in any order.  Unless indexing_suite has the
same property, you should probably use black.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list