From 2e1fcd32dd7ea265e48bb0cf4b7f9e0b9a27145f Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sat, 3 Mar 2018 13:42:44 -0500 Subject: [PATCH] update single --- single/sol/sol.hpp | 16 +++++++++++----- single/sol/sol_forward.hpp | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 9efd5b1d..1281db85 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2018-03-02 15:09:13.996712 UTC -// This header was generated with sol v2.19.4 (revision 94a6390) +// Generated 2018-03-03 18:42:29.548819 UTC +// This header was generated with sol v.2.19.4 (revision cd13f2d) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -7899,7 +7899,12 @@ namespace stack { template static bool check(lua_State* L, int index, Handler&& handler, record& tracking) { tracking.use(1); - return true; + bool success = is_lua_reference::value || !lua_isnone(L, index); + if (!success) { + // expected type, actual type + handler(L, index, type::poly, type_of(L, index), ""); + } + return success; } }; @@ -9551,15 +9556,16 @@ namespace stack { typedef std::integral_constant V_is_empty; template - static optional get_empty(std::true_type, lua_State* L, int index, Handler&& handler, record& tracking) { + static optional get_empty(std::true_type, lua_State*, int, Handler&&, record&) { return nullopt; } template - static optional get_empty(std::false_type, lua_State* L, int index, Handler&& handler, record& tracking) { + static optional get_empty(std::false_type, lua_State* L, int index, Handler&& handler, record&) { typedef std::variant_alternative_t<0, V> T; // This should never be reached... // please check your code and understand what you did to bring yourself here + // maybe file a bug report, or 5 handler(L, index, type::poly, type_of(L, index), "this variant code should never be reached: if it has, you have done something so terribly wrong"); return nullopt; } diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index 065818ee..4a6814fa 100644 --- a/single/sol/sol_forward.hpp +++ b/single/sol/sol_forward.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2018-03-02 15:09:14.750440 UTC -// This header was generated with sol v2.19.4 (revision 94a6390) +// Generated 2018-03-03 18:42:29.769950 UTC +// This header was generated with sol v.2.19.4 (revision cd13f2d) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP