From 1034979068e5611baa0093381e945d7ef4d7ce24 Mon Sep 17 00:00:00 2001 From: andriish Date: Tue, 9 Apr 2024 11:29:59 +0200 Subject: [PATCH 1/2] Update class.cpp to make code compatible with MSVC Update class.cpp to make code compatible with MSVC --- source/class.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/class.cpp b/source/class.cpp index b9f98f38..d5fdbbe2 100644 --- a/source/class.cpp +++ b/source/class.cpp @@ -752,6 +752,7 @@ string bind_member_functions_for_call_back(CXXRecordDecl const *C, string const if( return_type.find(',') != std::string::npos ) { string return_type_alias = "_binder_ret_" + std::to_string(ret_id); ++ret_id; + if (return_type.rfind("class ", 0) == 0) return_type = return_type.substr(6); c += "\tusing {} = {};\n"_format(return_type_alias, return_type); return_type = std::move(return_type_alias); } From cd158c6eea9f1006be64c3e766ca022e9d5811f3 Mon Sep 17 00:00:00 2001 From: andriish Date: Fri, 12 Apr 2024 11:45:41 +0200 Subject: [PATCH 2/2] Update class.cpp --- source/class.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/class.cpp b/source/class.cpp index d5fdbbe2..0fc8b96b 100644 --- a/source/class.cpp +++ b/source/class.cpp @@ -752,7 +752,7 @@ string bind_member_functions_for_call_back(CXXRecordDecl const *C, string const if( return_type.find(',') != std::string::npos ) { string return_type_alias = "_binder_ret_" + std::to_string(ret_id); ++ret_id; - if (return_type.rfind("class ", 0) == 0) return_type = return_type.substr(6); + if (begins_with(return_type,"class ")) return_type = return_type.substr(6); c += "\tusing {} = {};\n"_format(return_type_alias, return_type); return_type = std::move(return_type_alias); }