MCPcopy Create free account
hub / github.com/ThePhD/sol2 / is

Method is

include/sol/lua_value.hpp:128–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127 template <typename T>
128 bool is() const {
129 int r = ref_value.registry_index();
130 if (r == LUA_REFNIL)
131 return meta::any_same<meta::unqualified_t<T>, lua_nil_t, nullopt_t, std::nullptr_t>::value ? true : false;
132 if (r == LUA_NOREF)
133 return false;
134 auto pp = stack::push_pop(ref_value);
135 return stack::check<T>(ref_value.lua_state(), -1, &no_panic);
136 }
137 };
138
139 using array_value = typename lua_value::arr;

Callers

nothing calls this directly

Calls 3

push_popFunction · 0.85
registry_indexMethod · 0.45
lua_stateMethod · 0.45

Tested by

no test coverage detected