You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the result of sorting is same of that using default std::identity.
It might make more sense to use [](auto const& p) { return p.second; } as the projection.
Moreover, std::format("{}", pairs) (after sorting) gives [(0, "baz"), (1, "bar"), (2, "foo")] or [(1, "bar"), (0, "baz"), (2, "foo")] since C++23. Should we change the result in the example to match std::format?
The text was updated successfully, but these errors were encountered:
frederick-vs-ja
changed the title
[defns.projection] The example isn't demostrating the effects of customized projection
[defns.projection] The example isn't demonstrating the effects of customized projection
Aug 18, 2023
In the current example
the result of sorting is same of that using default
std::identity
.It might make more sense to use
[](auto const& p) { return p.second; }
as the projection.Moreover,
std::format("{}", pairs)
(after sorting) gives[(0, "baz"), (1, "bar"), (2, "foo")]
or[(1, "bar"), (0, "baz"), (2, "foo")]
since C++23. Should we change the result in the example to matchstd::format
?The text was updated successfully, but these errors were encountered: