Skip to content

给std::function的静态绑定增加引用类型参数的支持,以解决使用引用类型参数时会发生多次意外复制,以及无法传回数据的修改的问题#2273

Open
sagasarate wants to merge 6 commits into
Tencent:masterfrom
sagasarate:fix/static-bind-fix1

Conversation

@sagasarate
Copy link
Copy Markdown
Contributor

给std::function的静态绑定增加引用类型参数的支持,以解决使用引用类型参数时会发生多次意外复制,以及无法传回数据的修改的问题,同时给一些模板的类型匹配加上std::decay_t,避免某些时候出现匹配错误

@chexiongsheng
Copy link
Copy Markdown
Collaborator

提供个重现问题的例子?

@sagasarate
Copy link
Copy Markdown
Contributor Author

https://github.com/sagasarate/TestPrj12.git
这是我之前搞得测试项目,用的UE5.7,puerts是当时的master,应该是一个月前的版本,里面没放后端包,需要放入nodejs的后端
所有逻辑都在MyGameInstance中,直接启动,日志里会显示多次的“copy construct”,表示对象被复制了多次

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants