title: Is it possible to declare/implement a template within a function scope?
body: <p>Title == Question.</p>
  
  <p>To be very specific, is it possible to implement std::sinh like this?</p>
  
  <pre><code>namespace std {
      long double sinh(const long double arg) {
          template &lt;long double _arg&gt; long double _sinh() {
              // sinh implementaion here
          }
          template &lt;&gt; long double _sinh&lt;0&gt;() {return 0;}
          template &lt;&gt; long double _sinh&lt;-0&gt;() {return -0;}
          template &lt;&gt; long double _sinh&lt;INFINITY&gt;() {return INFINITY;}
          template &lt;&gt; long double _sinh&lt;-INFINITY&gt;() {return -INFINITY;}
          return _sinh&lt;arg&gt;();
      }
  }
  </code></pre>
  
  <p>I know, this is a stupid idea, but I am really curious.</p>