Add missing && when forwarding args (#925)

Without the && args would be copied and perfect forwarding won't work.
This commit is contained in:
Cheng
2024-03-29 22:48:29 +09:00
committed by GitHub
parent d8cb3128f6
commit 913b19329c
2 changed files with 32 additions and 32 deletions

View File

@@ -24,7 +24,7 @@
<< std::endl;
template <typename F, typename... Args>
double time_fn(F fn, Args... args) {
double time_fn(F fn, Args&&... args) {
// warmup
for (int i = 0; i < 5; ++i) {
eval(fn(std::forward<Args>(args)...));