Q:

Getting sizeof(MyClass) in class member declaration

I am working in embedded C++ project, where I plan to make memory statically allocated as much as I can.  So, I am writing a set of functions to override new/delete for all classes and for the global new/delete. 
Here is a naive implementation:
class MyClass
{
    int x;
    float y;
    double z;

    static MyClass m_preAllocatedObjects[100];  //Solution 1
    static char m_preAllocatedMemory[100 * sizeof(MyClass)]; //Solution 2
    static char* getPreAllocatedMemory() // Solution 3
    {
        static char localStaticMemory[100 * sizeof(MyClass)];
        return localStaticMemory;
    }

    static void* operator new(size_t s){ 
     void* p; /*fill p from the pre-allocated memory or object*/;
     return p;
    }
};

Solution 1: It works for object with default constructor only. 
Solution 2: It gives compilation error use of undefined type 'MyClass'; and this is what I am asking about. 
Solution 3: This solution works fine. 
The question is:
Why can I create static members of MyClass, while I can't get sizeof(MyClass)? 

A:

while I can't get sizeof(MyClass)? 

The reason is that MyClass is not fully defined until the closing } of the class definition, from section 9 Classes of the c++11 standard (draft n3337):

A class-name is inserted into the scope in which it is declared immediately after the class-name is seen. 
  The class-name is also inserted into the scope of the class itself; this is known as the injected-class-name. 
  For purposes of access checking, the injected-class-name is treated as if it were a public member name.  A
  class-specifier is commonly referred to as a class definition.  A class is considered defined after the closing
  brace of its class-specifier has been seen even though its member functions are in general not yet defined. 
  The optional attribute-specifier-seq appertains to the class; the attributes in the attribute-specifier-seq are
  thereafter considered attributes of the class whenever it is named. 

and sizeof can only be applied to a complete type, from section 5.3.3 Sizeof:

The sizeof operator yields the number of bytes in the object representation of its operand.  The operand is
  either an expression, which is an unevaluated operand (Clause 5), or a parenthesized type-id.  The sizeof
  operator shall not be applied to an expression that has function or incomplete type, to an enumeration
  type whose underlying type is not fixed before all its enumerators have been declared, to the parenthesized
  name of such types, or to an lvalue that designates a bit-field. ... 

To correct, define the size of the array outside of the class definition:
class MyClass
{
    static char m_preAllocatedMemory[];
};

char MyClass::m_preAllocatedMemory[100 * sizeof(MyClass)];

A:

To "know" the size of MyClass the compiler will need to know the whole class.  When you are forward declaring a static MyClass m_preAllocatedObjects[100]; you are actually not defining the variable - to actually get the variable, you will have to do :
MyClass MyClasss::m_preAllocatedObjects[100]; 

somewhere in a .cpp file.  This is where the memory for the objects are being "placed" as a lump in the data-segment.  So the compiler doesn't have to know the actual size of MyClass at the point where you declare the variable.  However, it does need to know the size to evaluate 100 * sizeof(MyClass). 