Cxx.jl
Cxx.jl copied to clipboard
Support `std::tuple`
It would be create if this would work.
using Cxx
cxx"""
#include <tuple>
"""
function f(i, j)
icxx"""
return std::make_tuple($i, $j);
"""
end
Right now it fails with:
ERROR: Unhandled template argument kind (8)
in getTemplateParameters(::Cxx.CppPtr{Cxx.CxxQualType{Cxx.CppBaseType{Symbol("clang::CXXRecordDecl")},(false,false,false)},(false,false,false)}, ::Bool, ::Dict{Int64,Void}) at /home/v/valentin-churavy/.julia/v0.5/Cxx/src/typetranslation.jl:427
in toBaseType(::Cxx.CppPtr{Cxx.CxxQualType{Cxx.CppBaseType{Symbol("clang::Type")},(false,false,false)},(false,false,false)}) at /home/v/valentin-churavy/.julia/v0.5/Cxx/src/typetranslation.jl:448
in #juliatype#23(::Bool, ::Bool, ::Function, ::Cxx.QualType, ::Bool, ::Dict{Int64,Void}) at /home/v/valentin-churavy/.julia/v0.5/Cxx/src/typetranslation.jl:610
in juliatype(::Cxx.QualType) at /home/v/valentin-churavy/.julia/v0.5/Cxx/src/typetranslation.jl:467
in #EmitExpr#36(::Array{Any,1}, ::Function, ::Cxx.ClangCompiler, ::Cxx.CppPtr{Cxx.CxxQualType{Cxx.CppBaseType{Symbol("clang::Expr")},(false,false,false)},(false,false,false)}, ::Ptr{Void}, ::Ptr{Void}, ::Tuple{DataType,DataType}, ::Array{Cxx.CppPtr{Cxx.CxxQualType{Cxx.CppBaseType{Symbol("clang::ParmVarDecl")},(false,false,false)},(false,false,false)},1}, ::Type{T}) at /home/v/valentin-churavy/.julia/v0.5/Cxx/src/codegen.jl:699
in (::Cxx.#kw##EmitExpr)(::Array{Any,1}, ::Cxx.#EmitExpr, ::Cxx.ClangCompiler, ::Cxx.CppPtr{Cxx.CxxQualType{Cxx.CppBaseType{Symbol("clang::Expr")},(false,false,false)},(false,false,false)}, ::Ptr{Void}, ::Ptr{Void}, ::Tuple{DataType,DataType}, ::Array{Cxx.CppPtr{Cxx.CxxQualType{Cxx.CppBaseType{Symbol("clang::ParmVarDecl")},(false,false,false)},(false,false,false)},1}, ::Type{T}) at ./<missing>:0
in #CallDNE#53(::Array{Any,1}, ::Function, ::Cxx.ClangCompiler, ::Cxx.CppPtr{Cxx.CxxQualType{Cxx.CppBaseType{Symbol("clang::Expr")},(false,false,false)},(false,false,false)}, ::Tuple{DataType,DataType}) at /home/v/valentin-churavy/.julia/v0.5/Cxx/src/cxxstr.jl:339
in (::Cxx.#kw##CallDNE)(::Array{Any,1}, ::Cxx.#CallDNE, ::Cxx.ClangCompiler, ::Cxx.CppPtr{Cxx.CxxQualType{Cxx.CppBaseType{Symbol("clang::Expr")},(false,false,false)},(false,false,false)}, ::Tuple{DataType,DataType}) at ./<missing>:0
in cxxstr_impl(...) at /home/v/valentin-churavy/.julia/v0.5/Cxx/src/cxxstr.jl:358
in f(::Int64, ::Int64) at ./REPL[4]:2
X-ref: #121
x-ref: https://github.com/Keno/Cxx.jl/issues/252