mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Merge pull request #451 from mpark/F.21
F.21: Fixed order of arguments to `make_tuple`.
This commit is contained in:
commit
782e070fcd
|
@ -2419,7 +2419,7 @@ And yes, C++ does have multiple return values, by convention of using a `tuple`,
|
||||||
tuple<int, string> f(const string& input) // GOOD: self-documenting
|
tuple<int, string> f(const string& input) // GOOD: self-documenting
|
||||||
{
|
{
|
||||||
// ...
|
// ...
|
||||||
return make_tuple(something(), status);
|
return make_tuple(status, something());
|
||||||
}
|
}
|
||||||
|
|
||||||
In fact, C++98's standard library already used this convenient feature, because a `pair` is like a two-element `tuple`.
|
In fact, C++98's standard library already used this convenient feature, because a `pair` is like a two-element `tuple`.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user