title: Is using a member function as an argument to a constructor undefined behavior?
body: <pre><code>#include &lt;cstdio&gt;
  
  class A
  {
  public:
      A(int){puts("3");};
  
      int foo(){puts("4");return 10;}
  };
  
  int main()
  {
      A a(a.foo());
      return 0;
  }
  </code></pre>
  
  <p>Outputs 4 and 3.</p>
  
  <p>It calls a member function before calling the constructor. Is the behavior defined by the standard?</p>