CxxWrap.jl
CxxWrap.jl copied to clipboard
std::pair<double,double> issues
When I try to return an std::pair<double,double>
from a function, CxxWrap raises:
C++ exception while wrapping module RoutingKit: No appropriate factory for type St4pairIddE
ERROR: LoadError: No appropriate factory for type St4pairIddE
Stacktrace:
[1] register_julia_module at /home/rick/.julia/packages/CxxWrap/lDNAy/src/CxxWrap.jl:360 [inlined]
[2] readmodule(::String, ::Symbol, ::Module, ::Nothing) at /home/rick/.julia/packages/CxxWrap/lDNAy/src/CxxWrap.jl:664
[3] wrapmodule(::String, ::Symbol, ::Module, ::Nothing) at /home/rick/.julia/packages/CxxWrap/lDNAy/src/CxxWrap.jl:670
[4] top-level scope at /home/rick/projects/RISE_ev_bus/dispatch/src/RoutingKit.jl:4
[5] include at ./boot.jl:328 [inlined]
[6] include_relative(::Module, ::String) at ./loading.jl:1105
[7] include(::Module, ::String) at ./Base.jl:31
[8] include(::String) at ./client.jl:424
[9] top-level scope at REPL[1]:1
in expression starting at /home/rick/projects/RISE_ev_bus/dispatch/src/RoutingKit.jl:4
The std::pair
type is not wrapped, currently. A possible workaround for now is to return an std::tuple
instead, these are transparently converted to Julia Tuples.