 <p>You cannot do what you want (because you ruled out dynamic allocation), and your "solution" does not work in general, even if you avoid the problems with compiler-generated special member functions which others mentioned. One problem is that types not only have a size, but also an alignment. For example, your real class contains an <code>int</code>, however your replacement class contains only a <code>char</code> array. Now on most platforms, <code>int</code> has alignment 4 (i.e. an <code>int</code> must be located at a 4 byte boundary), while <code>char</code> has aligment 1 (it cannot have any other alignment without violating the standard). That is, as soon as you try to create an object with your replacement definition, you risk getting it misaligned, which in the best case will cause a massive slowdown, in the worst case a crash of your program (and in the absolutely worst case, it will work in your tests, but fail when actually used).</p>