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

Function push_reference

include/sol/stack_core.hpp:922–937  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

920
921 template <typename T, typename Arg, typename... Args>
922 int push_reference(lua_State* L, Arg&& arg, Args&&... args) {
923 // clang-format off
924 using use_reference_tag =
925 meta::all<
926 meta::neg<is_value_semantic_for_function<T>>
927#if SOL_IS_OFF(SOL_FUNCTION_CALL_VALUE_SEMANTICS)
928 , std::is_lvalue_reference<T>,
929 meta::neg<std::is_const<std::remove_reference_t<T>>>,
930 meta::neg<is_lua_primitive<meta::unqualified_t<T>>>,
931 meta::neg<is_unique_usertype<meta::unqualified_t<T>>>
932#endif
933 >;
934 // clang-format on
935 using Tr = meta::conditional_t<use_reference_tag::value, detail::as_reference_tag, meta::unqualified_t<T>>;
936 return stack::push<Tr>(L, std::forward<Arg>(arg), std::forward<Args>(args)...);
937 }
938
939 } // namespace stack_detail
940

Callers 8

my_nextFunction · 0.85
multi_push_referenceFunction · 0.85
next_associativeMethod · 0.85
next_iterMethod · 0.85
getMethod · 0.85
call_into_luaFunction · 0.85
callMethod · 0.85
call_wrapper_variableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected