title: private method as trailing return type (decltype)
body: <p>When I am trying to use <code>decltype()</code> on a private method function I get the error that the private method <code>error: 'm1' has not been declared in this scope</code></p>
  
  <pre><code>#include &lt;stdint.h&gt;
  
  class C
  {
  public:
      C()=default;
      ~C()=default;
  
      auto masterMethod(int opMode) -&gt;decltype(m1())
      {
          switch(opMode)
          {
          case 1:
                  return m1(); break;
          case 2:
                  return m2(); break;
          default:
                  return m1(); break;
          }
      }
  private:
      int m1() {return 1;}
      int m2() {return 2;}
  };
  </code></pre>
  
  <p>Now my question is, why the compiler does not lookup in the private section of the class, because removing the trailing return type or putting the private section on top of <code>masterMethod</code> solves the problem (<code>decltype(auto)</code> [in case C++14 is allowed] would be also correct with its automatic return type deduction).</p>
  
  <p>Furthermore, is it bad behaviour when removing the <code>decltype(m1())</code>when <code>m1()</code> and <code>m2()</code> have the same return-type, as this would do it for me too?</p>