|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
The C++-operator → Lua metamethod name map, shared by both Lua runtime rods (sol2 and LuaBridge3). More...
Go to the source code of this file.
Namespaces | |
| namespace | welder |
| namespace | welder::rods |
| namespace | welder::rods::lua |
Functions | |
| consteval const char * | welder::rods::lua::lua_metamethod_name (std::meta::info f) |
| Map a member operator to its Lua metamethod __name, or nullptr if welder does not expose it (which also gates operator eligibility in the driver). | |
The C++-operator → Lua metamethod name map, shared by both Lua runtime rods (sol2 and LuaBridge3).
Lua's metamethod model is one set of __name slots regardless of which C++ wrapper lays the bindings down, so the which operators are exposed and under what __name decision lives here, once, and each rod reuses it:
The map reflects Lua's metamethod model, which differs from Python's dunders in three ways:
Requires the welder vocabulary first (#include <welder/vocabulary.hpp>) and the Lua headers (<lua.h>, pulled in by <sol/sol.hpp> / <LuaBridge/LuaBridge.h>) so LUA_VERSION_NUM is visible.
Definition in file metamethods.hpp.