import mir.test: should; import mir.string_map : StringMap; auto m0 = StringMap!int(["foo", "bar"], [1, 2]); auto m1 = StringMap!int(["foo"], [2]); auto m2 = StringMap!int(["foo", "bar"], [3, 2]); unionMap!"a + b"(m0, m1).should == m2;
See Implementation