CxxWrap.jl
CxxWrap.jl copied to clipboard
Passing a julia Set to C++ (std::set)
If I have a C++ function that accepts std::set<int64_t>
as an argument, will CxxWrap it to accept a julia Set{Int}
type, or do I need to do some intermediary work or use a CxxWrap type (like one does with ArrayRef
)?
No, and unlike the arrays types like Set
are implemented completely in Julia, so the easiest way is to manipulate the set on the Julia side, maybe converting it to an array and passing that to a wrapper function that turns it back into a set.
It's probably a good idea to add some generic support for these kind of conversions in CxxWrap, though.