CppInterOp.jl is a Julia wrapper for https://github.com/compiler-research/CppInterOp.
pkg> add CppInterOp
The following example demonstrates how to evaluate C++ code:
julia> import CppInterOp as Cpp
julia> I = Cpp.create_interpreter()
CppInterOp.Interpreter(Ptr{CppInterOp.LibCppInterOp.CXInterpreterImpl}(0x0000600002c22df0))
julia> Cpp.declare(I, "#include <iostream>")
true
julia> Cpp.process(I, """std::cout << 42 << std::endl;""")
42
true