sol2
sol2 copied to clipboard
Usertype created with sol::no_constructor provides function behind "new" key
trafficstars
A usertype declared with sol::no_constructor still has a constructor function in Lua, see the godbolt example: https://godbolt.org/z/oaoeYo3Gn. Might be intentional, but prohibits users to use this key for something else.
You can use it for whatever you like still:
https://godbolt.org/z/eqr68KP6q
(But I agree: I should just avoid registering it altogether.)