1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

fix(treewide): fix incorrect usage of std::move

`auto &&` and `T &&` are forwarding references and can be
either lvalue or rvalue references. Moving from universal references
is incorrect and should not be done.

Moving from integral or floating-point values is pointless and just
worsens debug performance.
This commit is contained in:
Sergei Zimmerman 2024-11-08 19:15:43 +03:00
parent 492c678162
commit 17b49134fa
3 changed files with 3 additions and 3 deletions

View file

@ -35,7 +35,7 @@ ExecutablePath ExecutablePath::parse(const OsString & path)
std::make_move_iterator(strings.begin()),
std::make_move_iterator(strings.end()),
std::back_inserter(ret),
[](auto && str) {
[](OsString && str) {
return fs::path{
str.empty()
// "A zero-length prefix is a legacy feature that