From b80e77b9c28c799c70f58d68e59fbea3b1b57ac5 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 29 Nov 2013 17:57:46 -0500 Subject: [PATCH] Add using statements for basic EnableIf and DisableIf --- sol/stack.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sol/stack.hpp b/sol/stack.hpp index 42d62601..09ffe32b 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -27,6 +27,12 @@ #include namespace sol { +template +using EnableIf = typename std::enable_if::type; + +template +using DisableIf = typename std::enable_if::type; + namespace stack { namespace detail { template @@ -116,7 +122,7 @@ inline T pop(lua_State* L) { } template -inline typename std::enable_if::value>::type push(lua_State* L, T arithmetic) { +inline EnableIf> push(lua_State* L, T arithmetic) { detail::push_arithmetic(L, arithmetic, std::is_integral{}); }