diff options
-rw-r--r-- | connection.h | 4 | ||||
-rw-r--r-- | util.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/connection.h b/connection.h index 213bf26f..dbb50b9a 100644 --- a/connection.h +++ b/connection.h @@ -144,9 +144,9 @@ namespace QMatrixClient * argument - callApi() will pass it automatically. */ template <typename JobT, typename... JobArgTs> - JobT* callApi(JobArgTs... jobArgs) const + JobT* callApi(JobArgTs&&... jobArgs) const { - auto job = new JobT(jobArgs...); + auto job = new JobT(std::forward<JobArgTs>(jobArgs)...); job->start(connectionData()); return job; } @@ -231,7 +231,7 @@ namespace QMatrixClient template <typename ResultT, typename... ArgTs> Dispatch<ResultT, ArgTs...> dispatch(ArgTs&& ... args) { - return Dispatch<ResultT, ArgTs...>(std::forward<ArgTs...>(args)...); + return Dispatch<ResultT, ArgTs...>(std::forward<ArgTs>(args)...); } // The below enables pretty-printing of enums in logs |