mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
subprocess: Fix string_arg when used with rref
When passing in a rvalue reference, compiler considers it ambiguous between std::string and std::string&&. Making one of them take a lvalue reference makes compilers correctly pick the right one depending on whether the passed in value binds to a rvalue or lvalue reference. Github-Pull: arun11299/cpp-subprocess#110 Rebased-From: 2d8a8eebb03e509840e2c3c755d1abf32d930f33
This commit is contained in:
parent
d62c2d82e1
commit
9888d0f511
1 changed files with 1 additions and 1 deletions
|
@ -527,7 +527,7 @@ struct string_arg
|
|||
{
|
||||
string_arg(const char* arg): arg_value(arg) {}
|
||||
string_arg(std::string&& arg): arg_value(std::move(arg)) {}
|
||||
string_arg(std::string arg): arg_value(std::move(arg)) {}
|
||||
string_arg(const std::string& arg): arg_value(arg) {}
|
||||
std::string arg_value;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue