title: Does a member have to be initialized to take its address?
body: <p>Can I initialize a pointer to a data member before initializing the member? In other words, is this valid C++?</p>
  
  <pre><code>#include &lt;string&gt;
  
  class Klass {
  public:
      Klass()
          : ptr_str{&amp;str}
          , str{}
      {}
  private:
      std::string *ptr_str;
      std::string str;
  };
  </code></pre>
  
  <p><a href="https://stackoverflow.com/q/33503206/10147399">this</a> question is similar to mine, but the order is correct there, and the answer says </p>
  
  <blockquote>
    <p>I'd advise against coding like this in case someone changes the order of the members in your class.</p>
  </blockquote>
  
  <p>Which seems to mean reversing the order would be illegal but I couldn't be sure.</p>