fix CallFuncExt incorrectly handling lvalue function references
Some checks failed
Build Binaries / Build Windows (push) Has been cancelled
Build Binaries / Build macOS (push) Has been cancelled
Build Binaries / Build Android (64-bit) (push) Has been cancelled
Build Binaries / Build Android (32-bit) (push) Has been cancelled
Build Binaries / Publish (push) Has been cancelled

This commit is contained in:
dankmeme01 2024-10-21 09:35:34 +02:00
parent d1053b1688
commit 1d31576694

View file

@ -1392,8 +1392,10 @@ namespace geode::cocos {
// small hack to allow template deduction
struct CallFuncExt {
template <std::invocable F>
static CallFuncExtImpl<F>* create(F&& func) {
return CallFuncExtImpl<F>::create(std::forward<F>(func));
static auto create(F&& func) {
using Fd = std::decay_t<F>;
return CallFuncExtImpl<Fd>::create(std::forward<F>(func));
}
};