diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 216d6830..1f4d56c9 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 2016-06-27 16:25:12.814979 UTC -// This header was generated with sol v2.8.9 (revision bd62d99) +// Generated 2016-06-27 16:44:52.053533 UTC +// This header was generated with sol v2.8.9 (revision 4a0bfe1) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -121,6 +121,12 @@ namespace sol { template using tuple_element_t = std::tuple_element_t>; + template + using unqualified_tuple_element = unqualified>; + + template + using unqualified_tuple_element_t = unqualified_t>; + } // meta } // sol @@ -8780,9 +8786,10 @@ namespace sol { typedef std::make_index_sequence indices; typedef std::index_sequence half_indices; typedef std::array regs_t; + typedef std::tuple Tuple; template - struct check_binding : is_variable_binding>>> {}; - std::tuple functions; + struct check_binding : is_variable_binding> {}; + Tuple functions; lua_CFunction indexfunc; lua_CFunction newindexfunc; lua_CFunction destructfunc; @@ -8792,13 +8799,13 @@ namespace sol { bool mustindex; bool secondarymeta; - template - static inline lua_CFunction make_func(lua_CFunction f) { - return f; + template >> = meta::enabler> + inline lua_CFunction make_func() { + return std::get(functions); } - template - static inline lua_CFunction make_func(F&&) { + template >> = meta::enabler> + inline lua_CFunction make_func() { return call; } @@ -8813,7 +8820,7 @@ namespace sol { return idx; } - int finish_regs(regs_t& l, int& index ) { + int finish_regs(regs_t& l, int& index) { if (destructfunc != nullptr) { l[index] = { name_of(meta_function::garbage_collect).c_str(), destructfunc }; ++index; @@ -8850,8 +8857,8 @@ namespace sol { } template , base_classes_tag, call_construction>::value>> - void make_regs(regs_t& l, int& index, N&& n, F&& f) { - luaL_Reg reg = usertype_detail::make_reg(std::forward(n), make_func(std::forward(f))); + void make_regs(regs_t& l, int& index, N&& n, F&&) { + luaL_Reg reg = usertype_detail::make_reg(std::forward(n), make_func()); // Returnable scope // That would be a neat keyword for C++ // returnable { ... }; diff --git a/sol/tuple.hpp b/sol/tuple.hpp index 6d5b3aa0..1f9a80be 100644 --- a/sol/tuple.hpp +++ b/sol/tuple.hpp @@ -68,6 +68,12 @@ namespace sol { template using tuple_element_t = std::tuple_element_t>; + template + using unqualified_tuple_element = unqualified>; + + template + using unqualified_tuple_element_t = unqualified_t>; + } // meta } // sol diff --git a/sol/usertype_metatable.hpp b/sol/usertype_metatable.hpp index a11a9f0f..bb7343a1 100644 --- a/sol/usertype_metatable.hpp +++ b/sol/usertype_metatable.hpp @@ -97,9 +97,10 @@ namespace sol { typedef std::make_index_sequence indices; typedef std::index_sequence half_indices; typedef std::array regs_t; + typedef std::tuple Tuple; template - struct check_binding : is_variable_binding>>> {}; - std::tuple functions; + struct check_binding : is_variable_binding> {}; + Tuple functions; lua_CFunction indexfunc; lua_CFunction newindexfunc; lua_CFunction destructfunc; @@ -109,13 +110,13 @@ namespace sol { bool mustindex; bool secondarymeta; - template - static inline lua_CFunction make_func(lua_CFunction f) { - return f; + template >> = meta::enabler> + inline lua_CFunction make_func() { + return std::get(functions); } - template - static inline lua_CFunction make_func(F&&) { + template >> = meta::enabler> + inline lua_CFunction make_func() { return call; } @@ -130,7 +131,7 @@ namespace sol { return idx; } - int finish_regs(regs_t& l, int& index ) { + int finish_regs(regs_t& l, int& index) { if (destructfunc != nullptr) { l[index] = { name_of(meta_function::garbage_collect).c_str(), destructfunc }; ++index; @@ -167,8 +168,8 @@ namespace sol { } template , base_classes_tag, call_construction>::value>> - void make_regs(regs_t& l, int& index, N&& n, F&& f) { - luaL_Reg reg = usertype_detail::make_reg(std::forward(n), make_func(std::forward(f))); + void make_regs(regs_t& l, int& index, N&& n, F&&) { + luaL_Reg reg = usertype_detail::make_reg(std::forward(n), make_func()); // Returnable scope // That would be a neat keyword for C++ // returnable { ... };