From 42a41bf3e70b5aa87945813f7bb722c2c75c14a8 Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Fri, 3 Jun 2022 15:18:06 -0400 Subject: [PATCH] remove useless ctor (#3989) --- include/pybind11/functional.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/functional.h b/include/pybind11/functional.h index f2a752e9d..4034990d8 100644 --- a/include/pybind11/functional.h +++ b/include/pybind11/functional.h @@ -99,7 +99,7 @@ public: Return operator()(Args... args) const { gil_scoped_acquire acq; // casts the returned object as a rvalue to the return type - return object(hfunc.f(std::forward(args)...)).template cast(); + return hfunc.f(std::forward(args)...).template cast(); } };