This is potentially subject to change in the near
future. This commit adds support for returning
an instance (currently wrapped in ForeignObject<>)
of a foreign object that is already instantiated.
The object returned this way simply gets selected
by handle into slot 0 of C Wren.
Conversely, returning just a naked object causes
wrenpp to make a Wren-accessible copy of it.
The "any tuple-like" thing was nice but
it was confusing when passing for example
a std::string, which is a typedef to a
tuple-like thing. Making a custom
ConstructorParameters struct is more clear
both to users and to the compiler.
This commit breaks the ARM64 version, I will fix it next.
Lots going on here. DynafuncMaker got updated to store strings
to back the ModuleAndName objects that get hardcoded in the
assembly glue function.
ModuleAndName is not a typedef to a tuple anymore, because I
discovered that tuples suck. They get always pushed on the stack
when passed as parameter, instead the new implementation gets
passed into 2 registers being it a standard layout type.
dhandy::bt::string got updated so it can be used as a literal
value for non-type template parameters, which allowed for a
really easy to use `wren::MN<>` helper. Code now fully requires
c++20.
No need to have two versions of this.
Static assert when users specify ambiguous overloads.
Currently overloads are discriminated only by
parameter count, not types, so we need to enforce this.
wren::get() can now be used to get foreign types by pointer.
Invoking get<A>() will return an A*. With this change it's
now possible to use variables() to get mixed foreign
and core types.