title: Initializer list with function pointer - is there a trick here?
body: <p>I've been reading a textbook on elementary data structures just for a review - it's been a while since I've written my own hash table or red/black tree :)</p>
  
  <p>Anyway, I ran into something that threw me a little.  The author is pretty intent on using the initializer list for every member (as one would hope), but in this one case where he is passing a function pointer to a hashing function, he opts to use the assignment operator in the constructor rather than setting up the pointer in the initializer list (and he is using the initializer list in this code as well):</p>
  
  <pre><code>template&lt;class DataType&gt;
  HashTable&lt;DataType&gt;::HashTable(int (*hf)(const DataType&amp;), int s)
      : table(s)
  {
      hashfunc = hf;
  }
  </code></pre>
  
  <p>where:</p>
  
  <pre><code>int (*hashfunc)(const DataType&amp;);
  </code></pre>
  
  <p>is a private member.</p>
  
  <p>I was wondering if there's some explicit reason for this choice, and if there's a pitfall he glazed over here - or if it's just a random lapse of thought.  Function pointers can have an interesting syntax, and I was basically wondering if it causes a problem in this area.</p>