title: why auto doesn't detect reference type of function
body: <p>I made a class with method, which returns reference to member (not good encapsulation). I'm using auto for retuned funtion</p>
  
  <pre><code>class classA
  {
      public:
      classA(classA &amp; rhs)
      {
          cout&lt;&lt;"copy constr A"&lt;&lt;endl;
      };
      classA() = default;
  };
  
  class classB
  {
      private:
      classA obA;
      public:
          classA&amp; getRefA(){return obA;}
  };
  
  int main()
  {
      classB obB;
  
      auto ob = obB.getRefA();
   }
  </code></pre>
  
  <p>The result is
  copy constr A</p>
  
  <p>I understand that auto don't detect reference from function. Is auto detecting only the type without reference?</p>