Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • C++

Idiom #313 Test for map equality

Set b to true if the maps m and n have the same key/value entries, false otherwise.

#include <map>
b = m == n;
import "maps"
b := maps.Equal(m, n)

maps.Equal is generic and type-safe at compile time.

New implementation...
< >
programming-idioms.org