Can you explain this member function template?
<p>Any one help me by explaining the real use of function templates. How to they work? This morning I saw some code but i still don't understand the real use of this:</p>

<pre><code>class A
{
template&lt;class T&gt; T getData() const
{
   const T* pointer == dynamic_cast&lt;const T*&gt;(mData)
   if(0 == pointer)
    {
     T defaultValue = T()
    }
  }
private:
  LData *mData; 
};
</code></pre>

<p>I don't understand anything of this. Can anyone give me a general idea about function templates?</p>

<p>Thanks</p>
