title: Initialize templated type to "zero"
body: <p>If I have a template function, say one that calculates an average by summing up the elements in a container of type T holding things of T::value_type, how do I elegantly initialize the sum with a zero?</p>
  
  <p>Suppose the underlying type is not a plain old data type.  It could be a complex variable, or some other as yet uncoded mathematical entity which has some form of a zero.</p>
  
  <p>Something more elegant than</p>
  
  <pre><code>T::value_type sum = 0;
  </code></pre>
  
  <p>Then hoping for the best cast. </p>