title: decltype as a return type in class member function
body: <p>I got error compiling below code. </p>
  
  <pre><code>struct B{
      double operator()(){
          return 1.0;
      }
  };
  
  struct A {
      auto func() -&gt; decltype(b())
      {
          return b();
      }
  
      B b;
  };
  </code></pre>
  
  <p>However, if I reorganize the <code>A</code>, it compiles. </p>
  
  <p>gcc 4.8 said that 'b' was not declared in this scope.</p>
  
  <pre><code>struct A {
      B b;
      auto func() -&gt; decltype(b())
      {
          return b();
      }
  };
  </code></pre>
  
  <p>So, what is wrong with the first??</p>