Quite peculiar:
map<bool,int> mb={{1,2},{3,4},{5,0}};
cout << mb.size();
map<int,int> mi={{1,2},{3,4},{5,0}};
cout << mi.size();
prints out
13
std::map
is unique-key. 1
, 3
, 5
all yield true
when converted to bool
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With