NK
Size: a a a
NK
А
А
NK
NK
NK
А⚙
#include <unordered_map>
using Map = std::unordered_map<int, int>;
void reassign(Map& map, int key1, int key2) {
auto p1 = map.insert_or_assign(key1, 0).first;
auto p2 = map.insert_or_assign(key2, 0).first;
p1->second = p2->second;
}
D
H
Adtpp: lightweight efficient safe polymorphic
algebraic data types for C
> We have not studied the impact of using adtpp on large scale software production...H
А⚙
RB
RB
RB
#include <unordered_map>
using Map = std::unordered_map<int, int>;
void reassign(Map& map, int key1, int key2) {
auto p1 = map.insert_or_assign(key1, 0).first;
auto p2 = map.insert_or_assign(key2, 0).first;
p1->second = p2->second;
}
RB
А
А⚙
RB
А
А