JuliaInterop / Cxx.jl

The Julia C++ Interface
Other
755 stars 107 forks source link

add automated conversions for std::complex? #470

Open stevengj opened 4 years ago

stevengj commented 4 years ago

Since std::complex<T> can be losslessly converted to/from Complex{T} for typical bitstypes T, it seems like these conversions should be automatic in Cxx.jl?

I was thinking of submitting a PR for this, but wanted to check whether this is desired.

goretkin commented 4 years ago

I think the automatic conversions in PyCall are great, and it's also great to be able to inhibit the conversion with e.g. py"1j"o.