title: What does the C++14 standard say regarding auto as argument type
body: <p>Lets take a look at the following code below:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  class Test
  {
  private:
      int x;
  public:
      Test(int _x) :
          x(_x)
      {
          std::cout &lt;&lt; "Im being constructed" &lt;&lt; std::endl;
      }
  
      int getx()
      {
          return this-&gt;x;
      }
  
      friend std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, Test&amp; other)
      {
          os &lt;&lt; other.getx();
          return os;
      }
  };
  
  auto func(auto x)
  {
      std::cout &lt;&lt; x &lt;&lt; std::endl;
      return x.getx();
  }
  
  int main()
  {
      auto y = func(20);
  
      return 0;
  }
  </code></pre>
  
  <p>How does the compiler decide if (20) should be an int or Test object? The constructor for Test is not explicit so what does the standard say about it?</p>