17990 typedef container_usertype_metatable<std::conditional_t<is_shim,
17991 as_container_t<std::remove_pointer_t<T>>,
17992 std::remove_pointer_t<T>>>
17994 static const char* metakey = is_shim ? &usertype_traits<as_container_t<std::remove_pointer_t<T>>>::metatable()[0] : &
usertype_traits<T>::metatable()[0];
17995 static const std::array<luaL_Reg, 19> reg = { {
17996 {
"__pairs", &meta_cumt::pairs_call },
17997 {
"__ipairs", &meta_cumt::ipairs_call },
17998 {
"__len", &meta_cumt::length_call },
17999 {
"__index", &meta_cumt::index_call },
18000 {
"__newindex", &meta_cumt::new_index_call },
18001 {
"pairs", &meta_cumt::pairs_call },
18002 {
"next", &meta_cumt::next_call },
18003 {
"at", &meta_cumt::at_call },
18004 {
"get", &meta_cumt::get_call },
18005 {
"set", &meta_cumt::set_call },
18006 {
"size", &meta_cumt::length_call },
18007 {
"empty", &meta_cumt::empty_call },
18008 {
"clear", &meta_cumt::clear_call },
18009 {
"insert", &meta_cumt::insert_call },
18010 {
"add", &meta_cumt::add_call },
18011 {
"find", &meta_cumt::find_call },
18012 {
"erase", &meta_cumt::erase_call },
18013 std::is_pointer<T>::value ? luaL_Reg{
nullptr,
nullptr } : luaL_Reg{
"__gc", &detail::usertype_alloc_destruct<T> },
18014 {
nullptr,
nullptr }
18017 if (luaL_newmetatable(
L, metakey) == 1) {
18018 luaL_setfuncs(
L, reg.data(), 0);
18020 lua_setmetatable(
L, -2);
static const std::string & metatable()
Definition: sol.hpp:6173