title: std::map size is always one
body: <p>I have a problem with the std::map. The following code is used:<br><br></p>
  
  <pre><code>struct cmp_address {
  
      bool operator()(unsigned long const a, unsigned long const b) {
          return a == b;
      }
  };
  
  void test() {
  map&lt;unsigned long,char,cmp_address&gt; data;
  int numRows = 1000; //this is the number of rows (or number of IP addresses)
      for (int i=1;i&lt;numRows;i++) {
          struct in_addr inp;
          int res = inet_aton("An IP ADdress", &amp;inp);
          if (res) {
  //            address is valid
              unsigned long addr = inp.s_addr;
  //            data.insert(std::make_pair&lt;unsigned long,char&gt;(addr, 1)); //doesn't work
              data[addr] = 1; //dowsn't work
          }
      }
  
  printf("Loaded rows=%d\n", data.size()); //size is always=1
  };
  </code></pre>
  
  <p>The map has long as key and char as value.
  I'm inserting approx 1,2 million key-value pairs in the map, but the size is always 1.<br>
  <br>
  Any help will be appreciated,<br>
  Thanks</p>