File tree Expand file tree Collapse file tree 1 file changed +4
-19
lines changed Expand file tree Collapse file tree 1 file changed +4
-19
lines changed Original file line number Diff line number Diff line change @@ -99,25 +99,10 @@ class MapVector {
9999 return try_emplace_impl (Key).first ->second ;
100100 }
101101
102- [[nodiscard]] inline auto keys () {
103- return map_range (
104- Vector, [](const std::pair<KeyT, ValueT> &KV) { return KV.first ; });
105- }
106-
107- [[nodiscard]] inline auto values () {
108- return map_range (
109- Vector, [](const std::pair<KeyT, ValueT> &KV) { return KV.second ; });
110- }
111-
112- [[nodiscard]] inline auto keys () const {
113- return map_range (
114- Vector, [](const std::pair<KeyT, ValueT> &KV) { return KV.first ; });
115- }
116-
117- [[nodiscard]] inline auto values () const {
118- return map_range (
119- Vector, [](const std::pair<KeyT, ValueT> &KV) { return KV.second ; });
120- }
102+ [[nodiscard]] inline auto keys () { return make_first_range (Vector); }
103+ [[nodiscard]] inline auto values () { return make_second_range (Vector); }
104+ [[nodiscard]] inline auto keys () const { return make_first_range (Vector); }
105+ [[nodiscard]] inline auto values () const { return make_second_range (Vector); }
121106
122107 // Returns a copy of the value. Only allowed if ValueT is copyable.
123108 [[nodiscard]] ValueT lookup (const KeyT &Key) const {
You can’t perform that action at this time.
0 commit comments