title: Why use static function template?
body: <p>I'm reading Alex Graves's <a href="https://github.com/meierue/RNNLIB" rel="nofollow">rnnlib</a>.
  In his codes there are many static function templates which are not class member methods but defined as <code>static</code>, while some are not.(see below)</p>
  
  <p>Some code snipplets of <a href="https://github.com/meierue/RNNLIB/blob/master/src/Helpers.hpp" rel="nofollow"><code>Helpers.hpp</code></a>:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>...
  // static
  template &lt;class R&gt; static void sort(R&amp; r)  
  {
      sort(boost::begin(r), boost::end(r));
  }
  // static
  template &lt;class R&gt; static void reverse_sort(R&amp; r) 
  {
      sort(boost::rbegin(r), boost::rend(r));
  }
  // non static
  template &lt;class R&gt; pair&lt;typename range_value&lt;R&gt;::type, typename range_value&lt;R&gt;::type&gt; minmax(const R&amp; r) 
  {
      pair&lt;typename range_const_iterator&lt;R&gt;::type, typename range_const_iterator&lt;R&gt;::type&gt; p = minmax_element(boost::begin(r), boost::end(r));
      return make_pair(*p.first, *p.second); 
  }
  // static
  template &lt;class R&gt; static void bound_range (R&amp; r, const typename boost::range_value&lt;R&gt;::type&amp; minVal, const typename boost::range_value&lt;R&gt;::type&amp; maxVal)
  {
      for (typename range_iterator&lt;R&gt;::type it = boost::begin(r); it != boost::end(r); ++it) 
      {
          *it = bound(*it, minVal, maxVal);
      }
  }
  ...
  </code></pre>
  
  <p>Why are some of these global function templates defined as <strong>static</strong> while some are <strong>not</strong>?</p>