Do function definitions in a class take up part of the class's size?
<p>Suppose:</p>

<pre><code>Class A{
  float one;
  float two;
  float three;
 //... many, many member functions, and maybe static functions too ..
  }
</code></pre>

<p>Can I assume that, <strong>no matter how many functions are in this class</strong>, the following should <em>generally</em> be true:</p>

<p><code>sizeof(A)==sizeof(float)*3</code></p>

<p>Such that I could even assert this:</p>

<p><code>static_assert(sizeof(A) == sizeof(float) * 3, "Your class is padding memory.");</code></p>

<p>Is this accurate?</p>

<p>Now, suppose class A inherits from another class. I assume the above would <em>not</em> be true, and rather you'd have to include in the <code>sizeof</code> assertion the addition of the size of ivars from the base class?</p>
