title: Which method to use to check if array key exists in std::map?
body: <p>I'm using the following code in some cases:</p>
  
  <pre><code>#define array_key_exists(find_key, arr) (arr.find(find_key) != arr.end())
  </code></pre>
  
  <p>But i also use simply this method:</p>
  
  <pre><code>if(SomeMap["something"]){
      // key exists
  }
  </code></pre>
  
  <p>I am using String to int map.</p>
  
  <p>Are they both as fast...? Or is there a possibility for errors with the second case, assuming i am not using zero value in the map values at all? So far the second case seems to work just fine.</p>