The C++20 std::views::keys and std::views::values are specialized views that represent the views over the keys and values of associate containers.
Reminder: for std::set and std::unordered_set (and their multi-variants), the elements are keys, not values.
Click to open in Compiler Explorer.
Leave a comment