title: Does members of class location in memory depend on the location of class members in the class definition?
body: <p>I have a part of chain class</p>
  
  <pre><code>template &lt;typename T&gt; 
  class Part
  {
  public:
  
  part* prev;
  part* next;
  T data;
  }
  </code></pre>
  
  <p>Size of T is undefined now and i think it must be better to place it in the end in memory. </p>
  
  <p>For example, if I move 8 bytes to the right, then I’ll definitely go to the beginning of the next class member (on a 64 bit system), and if I first put T, then I don’t know where I will go. Will I influence how the class members are located in memory or the compiler will do everything as he wants?</p>
  
  <p>And can i help to perfomance with use it?</p>