From ccba856216d45303621cc85f39cc7974785c8864 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Fri, 15 Jun 2018 16:37:44 -0400 Subject: [PATCH] Fiinaly remember the right keyword to place for a dependent typename... --- single/sol/sol.hpp | 25 +++++++++++++------------ single/sol/sol_forward.hpp | 4 ++-- sol/inheritance.hpp | 12 +++++++----- sol/stack_check_qualified.hpp | 1 - sol/types.hpp | 8 ++++---- 5 files changed, 26 insertions(+), 24 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 693f14f6..75a20323 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-06-15 19:59:17.486340 UTC -// This header was generated with sol v2.20.2 (revision fd52cc1) +// Generated 2018-06-15 20:37:27.879370 UTC +// This header was generated with sol v2.20.2 (revision 964f8e1) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -4736,7 +4736,7 @@ namespace sol { typedef T type; typedef T actual_type; template - using base_id = void; + using rebind_base = void; static const bool value = false; @@ -4756,10 +4756,10 @@ namespace sol { typedef T type; typedef std::shared_ptr actual_type; // rebind is non-void - // and tag is a unique integer // if and only if unique usertype // is cast-capable - using base_id = std::shared_ptr; + template + using rebind_base = std::shared_ptr; static const bool value = true; @@ -4777,7 +4777,7 @@ namespace sol { typedef T type; typedef std::unique_ptr actual_type; template - using base_id = void; + using rebind_base = void; static const bool value = true; @@ -6258,13 +6258,14 @@ namespace sol { } template - static bool type_unique_cast_bases(void*, const string_view&) { + static bool type_unique_cast_bases(void*, void*, const string_view&) { return false; } template static bool type_unique_cast_bases(void* source_data, void* target_data, const string_view& ti) { - typedef typename unique_usertype_traits::rebind_base base_ptr; + typedef unique_usertype_traits uu_traits; + typedef typename uu_traits::template rebind_base base_ptr; string_view base_ti = usertype_traits::qualified_name(); if (base_ti == ti) { if (target_data != nullptr) { @@ -6275,18 +6276,19 @@ namespace sol { } return true; } - return type_unique_cast_bases(source_data, target_data, ti); + return type_unique_cast_bases(source_data, target_data, ti); } template static bool type_unique_cast(void* source_data, void* target_data, const string_view& ti, const string_view& rebind_ti) { - typedef typename unique_usertype_traits::rebind_base rebind_t; + typedef unique_usertype_traits uu_traits; + typedef typename uu_traits::template rebind_base rebind_t; string_view this_rebind_ti = usertype_traits::qualified_name(); if (rebind_ti != this_rebind_ti) { // this is not even of the same container type return false; } - return type_unique_cast_bases(source_data, target_data, ti); + return type_unique_cast_bases(source_data, target_data, ti); } }; @@ -8735,7 +8737,6 @@ namespace stack { struct qualified_checker::value && !std::is_reference::value>> { typedef unique_usertype_traits> u_traits; typedef typename u_traits::type T; - typedef typename u_traits::base_id base_id; template static bool check(std::false_type, lua_State* L, int index, Handler&& handler, record& tracking) { diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index dae5143b..78ff2877 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-06-15 19:59:17.969682 UTC -// This header was generated with sol v2.20.2 (revision fd52cc1) +// Generated 2018-06-15 20:37:28.444838 UTC +// This header was generated with sol v2.20.2 (revision 964f8e1) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP diff --git a/sol/inheritance.hpp b/sol/inheritance.hpp index 316de253..d8537a79 100644 --- a/sol/inheritance.hpp +++ b/sol/inheritance.hpp @@ -97,13 +97,14 @@ namespace sol { } template - static bool type_unique_cast_bases(void*, const string_view&) { + static bool type_unique_cast_bases(void*, void*, const string_view&) { return false; } template static bool type_unique_cast_bases(void* source_data, void* target_data, const string_view& ti) { - typedef typename unique_usertype_traits::rebind_base base_ptr; + typedef unique_usertype_traits uu_traits; + typedef typename uu_traits::template rebind_base base_ptr; string_view base_ti = usertype_traits::qualified_name(); if (base_ti == ti) { if (target_data != nullptr) { @@ -114,18 +115,19 @@ namespace sol { } return true; } - return type_unique_cast_bases(source_data, target_data, ti); + return type_unique_cast_bases(source_data, target_data, ti); } template static bool type_unique_cast(void* source_data, void* target_data, const string_view& ti, const string_view& rebind_ti) { - typedef typename unique_usertype_traits::rebind_base rebind_t; + typedef unique_usertype_traits uu_traits; + typedef typename uu_traits::template rebind_base rebind_t; string_view this_rebind_ti = usertype_traits::qualified_name(); if (rebind_ti != this_rebind_ti) { // this is not even of the same container type return false; } - return type_unique_cast_bases(source_data, target_data, ti); + return type_unique_cast_bases(source_data, target_data, ti); } }; diff --git a/sol/stack_check_qualified.hpp b/sol/stack_check_qualified.hpp index 4207ef9e..3f346267 100644 --- a/sol/stack_check_qualified.hpp +++ b/sol/stack_check_qualified.hpp @@ -34,7 +34,6 @@ namespace stack { struct qualified_checker::value && !std::is_reference::value>> { typedef unique_usertype_traits> u_traits; typedef typename u_traits::type T; - typedef typename u_traits::base_id base_id; template static bool check(std::false_type, lua_State* L, int index, Handler&& handler, record& tracking) { diff --git a/sol/types.hpp b/sol/types.hpp index 6f41dc04..2a7da05c 100644 --- a/sol/types.hpp +++ b/sol/types.hpp @@ -156,7 +156,7 @@ namespace sol { typedef T type; typedef T actual_type; template - using base_id = void; + using rebind_base = void; static const bool value = false; @@ -176,10 +176,10 @@ namespace sol { typedef T type; typedef std::shared_ptr actual_type; // rebind is non-void - // and tag is a unique integer // if and only if unique usertype // is cast-capable - using base_id = std::shared_ptr; + template + using rebind_base = std::shared_ptr; static const bool value = true; @@ -197,7 +197,7 @@ namespace sol { typedef T type; typedef std::unique_ptr actual_type; template - using base_id = void; + using rebind_base = void; static const bool value = true;