title: For-loop or std::any_of, which one should I use?
body: <p>I can't decide between a <em>for-loop</em> and <em>std::any_of</em>, e.g:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>QString fileName = "Whatever";  // might contain a key-string which is part of sMyStringlist()
  auto anyTypeContains = [&amp;](const QString&amp; categoryStr)
  {
      for(auto const &amp;keyStr : sMyStringlist()[categoryStr])
          if(fileName.contains(keyStr, Qt::CaseInsensitive))
              return true;
      return false;
  };
  if(anyTypeContains("myCategory"))
  ...
  </code></pre>
  
  <p>or</p>
  
  <pre class="lang-cpp prettyprint-override"><code>QString fileName = "Whatever";  // might contain a key-string which is part of sMyStringlist()
  auto anyTypeContains = [&amp;](const QString&amp; categoryStr)
  {
      return std::any_of(
                  sMyStringlist()[categoryStr].begin(),
                  sMyStringlist()[categoryStr].end(),
                  [&amp;](const QString&amp; keyStr){
          return fileName.contains(keyStr, Qt::CaseInsensitive);
      });
  };
  if(anyTypeContains("myCategory"))
  ...
  </code></pre>
  
  <p>I think the <em>for-loop</em> might be better since everyone should be familiar with it. Is there any reason for using <em>any_of</em> or is it just a matter of taste? Are there other (better) alternatives? Thanks in advance.</p>