title: C++98 Valid use of "for_each" in the code
body: <p>I want to go directly in the code; Here is my struct:</p>
  
  <pre><code>struct pnt {
    mesh::Point _point;
    pnt_type _type;
    bool _aux;
    };
  
  enum NNSerach {A_NN = 0, B_NN, C_NN, ALL}; 
  </code></pre>
  
  <p>and here is my function:</p>
  
  <pre><code>void typeDetection( pnt&amp; PNT, const NNSerach NNType, const fieldclass&amp; field )
  </code></pre>
  
  <p>Here is my for loop inside a member function of the fieldclass.</p>
  
  <pre><code>vector&lt; pnt &gt; oldpnTs;
  ...
    for(size_t iter = 0; iter &lt; oldpnTs.size(); iter++ )
    {
      typeDetection(oldpnTs[iter], ALL, *this);
    }
  </code></pre>
  
  <p>Is it possible to use for_each here, when my vector member is only one of the arguments of the applied function?</p>
  
  <p><strong>EDIT</strong>: I can only use <strong>C++98</strong>
  I want to apply typeDetection function for each member of the oldpnTs vector.</p>