title: Calling template function within template class
body: <p>Disclaimer: The following question probably is so easy that I might be shocked seeing the first answer. Furthermore, I want to apologize for any duplicate questions - syntactic problems are not always easy to identify be verbal explanation and thus searching for them is not as easy...</p>
  
  <p>But enough of that. I have a two templated classes, one of those has a templated member function, the other class attempts to call that function. A minimal, error producing example is shown below:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  template &lt;typename T&gt;
  class Foo {
  public:
      Foo() {
      }
  
      template &lt;typename outtype&gt;
      inline outtype bar(int i, int j, int k = 1) {
          return k;
      }
  
  };
  
  template &lt;typename T&gt;
  class Wrapper {
  public:
      Wrapper() {
      }
  
      double returnValue() {
          Foo&lt;T&gt; obj;
          return obj.bar&lt;double&gt;(1,2); // This line is faulty.
      }
  
  };
  
  int main() {
      Wrapper&lt;char&gt; wr;
      double test = wr.returnValue();
      std::cout &lt;&lt; test &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>At compile time, this results in </p>
  
  <pre><code>expected primary-expression before 'double'
  expected ';' before 'double'
  expected unqualified-id before '&gt;' token
  </code></pre>
  
  <p>where all error messages are directed at the linke marked in the code.</p>
  
  <p>I allready thank you for your ideas, no matter how obvious they are.</p>