On Wed, Jul 7, 2010 at 3:49 PM, Dag Sverre Seljebotn
<[email protected]> wrote:
> Robert Bradshaw wrote:
>> The primary goal with C++ support is to provide just enough C++isms to
>> easily use any of the many C++ libraries out there, but not so much
>> that the user can easily hang themselves. The goal is not to
>> facilitate writing C++ in Cython, but rather using C++ from Cython
>> (though the two overlap quite a bit on the technical plane). If we
>> want to disallow, say, references in function arguments, now is the
>> time to do so. Is there any reason this is necessary to allow?
>>
> I don't think anything of this has been on writing C++, just about
> talking to C++ libraries.
>
> The reason to allow references in function arguments in "cdef extern"
> C++ functions is that, well, libraries do come with such constructs, and
> it is not clear how one would communicate with them if references in
> function arguments isn't supported somehow. They can be used either as
> out arguments, or for passing around some global context, etc.
>
> Dag Sverre
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
Actually, I don't really get
template<typename T,typename V>
assign(T &target, const V &value){ target=value;}
cdef extern from "<vector>":
cdef cppclass vector[T]:
assign(vect.at(4),56)
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev