Commit e922bb8
committed
clang-tidy: Fix bugprone-move-forwarding-reference error
/ci_container_base/include/mp/type-interface.h:47:75: error: forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference,-warnings-as-errors]
https://cirrus-ci.com/task/6187773452877824?logs=ci#L4712
Error was caused by mp/type-interface.h CustomBuildField field using std::move
instead of std::forward.
Just switching from std::move to std::forward, however, would lead to another
error in the CustomMakeProxyServer function which is expecting an rvalue, not
an lvalue.
That error could be fixed by changing CustomMakeProxyServer to accept lvalues
and copy the shared_ptr, which would have a slight performance cost. But it is
better to resolve the problem at the root and switch to perfect forwarding
everywhere, all the way up the call stack. This required some small changes to
the code generator and clientInvoke.1 parent c1e8c1a commit e922bb8
File tree
4 files changed
+33
-10
lines changed- include/mp
- src/mp
4 files changed
+33
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
| 388 | + | |
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
403 | 410 | | |
404 | 411 | | |
405 | 412 | | |
| |||
577 | 584 | | |
578 | 585 | | |
579 | 586 | | |
580 | | - | |
| 587 | + | |
581 | 588 | | |
582 | 589 | | |
583 | 590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
202 | 211 | | |
203 | 212 | | |
204 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
| 515 | + | |
515 | 516 | | |
516 | 517 | | |
| 518 | + | |
| 519 | + | |
517 | 520 | | |
518 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
519 | 529 | | |
520 | 530 | | |
521 | 531 | | |
| |||
529 | 539 | | |
530 | 540 | | |
531 | 541 | | |
532 | | - | |
| 542 | + | |
533 | 543 | | |
534 | 544 | | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
| 545 | + | |
539 | 546 | | |
540 | 547 | | |
541 | 548 | | |
| |||
0 commit comments