title: Iterate over all files in a directory using BOOST_FOREACH
body: <p>Can you iterate over all files in a directory using boost::filesystem and BOOST_FOREACH?
  I tried</p>
  
  <pre><code>path dirPath = ...
  int fileCount = 0;
  BOOST_FOREACH(const path&amp; filePath, dirPath)
      if(is_regular_file(filePath))
          ++fileCount;
  </code></pre>
  
  <p>This code compiles, runs, but does not produce the desired result.</p>