This commit is contained in:
ThePhD 2019-05-21 02:27:02 -04:00
parent 5dee45cd9e
commit ad1b9666c1
No known key found for this signature in database
GPG Key ID: 1509DB1C0F702BFA
4 changed files with 14 additions and 22 deletions

View File

@ -29,7 +29,7 @@
namespace sol { namespace sol {
template <typename R = reference, bool should_pop = !is_stack_based<R>::value, typename T> template <typename R = reference, bool should_pop = !is_stack_based_v<R>, typename T>
R make_reference(lua_State* L, T&& value) { R make_reference(lua_State* L, T&& value) {
int backpedal = stack::push(L, std::forward<T>(value)); int backpedal = stack::push(L, std::forward<T>(value));
R r = stack::get<R>(L, -backpedal); R r = stack::get<R>(L, -backpedal);
@ -39,7 +39,7 @@ namespace sol {
return r; return r;
} }
template <typename T, typename R = reference, bool should_pop = !is_stack_based<R>::value, typename... Args> template <typename T, typename R = reference, bool should_pop = !is_stack_based_v<R>, typename... Args>
R make_reference(lua_State* L, Args&&... args) { R make_reference(lua_State* L, Args&&... args) {
int backpedal = stack::push<T>(L, std::forward<Args>(args)...); int backpedal = stack::push<T>(L, std::forward<Args>(args)...);
R r = stack::get<R>(L, -backpedal); R r = stack::get<R>(L, -backpedal);

View File

@ -409,14 +409,10 @@ namespace sol {
struct unqualified_pusher<T, std::enable_if_t<is_container_v<T>>> { struct unqualified_pusher<T, std::enable_if_t<is_container_v<T>>> {
using C = T; using C = T;
static int push(lua_State* L, const T& cont) { template <typename... Args>
static int push(lua_State* L, Args&&... args) {
stack_detail::metatable_setup<C> fx(L); stack_detail::metatable_setup<C> fx(L);
return stack::push<detail::as_value_tag<T>>(L, detail::with_function_tag(), fx, cont); return stack::push<detail::as_value_tag<T>>(L, detail::with_function_tag(), fx, std::forward<Args>(args)...);
}
static int push(lua_State* L, T&& cont) {
stack_detail::metatable_setup<C> fx(L);
return stack::push<detail::as_value_tag<T>>(L, detail::with_function_tag(), fx, std::move(cont));
} }
}; };

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2019-05-21 06:13:48.131882 UTC // Generated 2019-05-21 06:26:29.108703 UTC
// This header was generated with sol v3.0.1-beta2 (revision bd17c83) // This header was generated with sol v3.0.1-beta2 (revision 5dee45c)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2019-05-21 06:13:47.481002 UTC // Generated 2019-05-21 06:26:28.717749 UTC
// This header was generated with sol v3.0.1-beta2 (revision bd17c83) // This header was generated with sol v3.0.1-beta2 (revision 5dee45c)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP #ifndef SOL_SINGLE_INCLUDE_HPP
@ -14514,7 +14514,7 @@ namespace sol {
namespace sol { namespace sol {
template <typename R = reference, bool should_pop = !is_stack_based<R>::value, typename T> template <typename R = reference, bool should_pop = !is_stack_based_v<R>, typename T>
R make_reference(lua_State* L, T&& value) { R make_reference(lua_State* L, T&& value) {
int backpedal = stack::push(L, std::forward<T>(value)); int backpedal = stack::push(L, std::forward<T>(value));
R r = stack::get<R>(L, -backpedal); R r = stack::get<R>(L, -backpedal);
@ -14524,7 +14524,7 @@ namespace sol {
return r; return r;
} }
template <typename T, typename R = reference, bool should_pop = !is_stack_based<R>::value, typename... Args> template <typename T, typename R = reference, bool should_pop = !is_stack_based_v<R>, typename... Args>
R make_reference(lua_State* L, Args&&... args) { R make_reference(lua_State* L, Args&&... args) {
int backpedal = stack::push<T>(L, std::forward<Args>(args)...); int backpedal = stack::push<T>(L, std::forward<Args>(args)...);
R r = stack::get<R>(L, -backpedal); R r = stack::get<R>(L, -backpedal);
@ -20549,14 +20549,10 @@ namespace sol {
struct unqualified_pusher<T, std::enable_if_t<is_container_v<T>>> { struct unqualified_pusher<T, std::enable_if_t<is_container_v<T>>> {
using C = T; using C = T;
static int push(lua_State* L, const T& cont) { template <typename... Args>
static int push(lua_State* L, Args&&... args) {
stack_detail::metatable_setup<C> fx(L); stack_detail::metatable_setup<C> fx(L);
return stack::push<detail::as_value_tag<T>>(L, detail::with_function_tag(), fx, cont); return stack::push<detail::as_value_tag<T>>(L, detail::with_function_tag(), fx, std::forward<Args>(args)...);
}
static int push(lua_State* L, T&& cont) {
stack_detail::metatable_setup<C> fx(L);
return stack::push<detail::as_value_tag<T>>(L, detail::with_function_tag(), fx, std::move(cont));
} }
}; };