JLCXX_MODULE define_julia_module(jlcxx::Module& types)
{
types.add_type<World>("World")
.constructor<const std::string&>()
.constructor<int_t>(false) // no finalizer
.method("set", &World::set)
.method("greet", &World::greet)
.method("greet_lambda", [ ](const World& w) { return w.greet(); } );
}
As shown above, we can create a new member function “greet_lambda” that is not defined in C++ class. Is it possibe to create a new constructor? If yes, what is its syntax, may I have a simple demo? Thanks