title: C++ template programming struct vs template
body: <p>To provide a functionality for a class cls, say, 'add', following are the types I decided:</p>
  
  <pre><code>struct add
  {
        add sum(add other) { ... }
  };
  </code></pre>
  
  <p>vs.</p>
  
  <pre><code>template&lt;typename Add&gt;
  Add sum(Add one, Add two) { ... }
  </code></pre>
  
  <p>Which approach should be preferred, what advantages do the first have over the second and vice versa?</p>