MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / deref_move_only

Function deref_move_only

extlibs/sol3/include/sol/sol.hpp:1187–1195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1185
1186 template <typename T>
1187 inline decltype(auto) deref_move_only(T&& item) {
1188 using Tu = meta::unqualified_t<T>;
1189 if constexpr (meta::is_pointer_like_v<Tu> && !std::is_pointer_v<Tu> && !std::is_copy_constructible_v<Tu>) {
1190 return *std::forward<T>(item);
1191 }
1192 else {
1193 return std::forward<T>(item);
1194 }
1195 }
1196
1197 template <typename T>
1198 inline T* ptr(T& val) {

Calls

no outgoing calls

Tested by

no test coverage detected