+1  A: 

There's reinterpret_cast, but it requires proper alignment, memmove doesn't.

Ben Voigt
This will help for one part (see comment in code segment I posted above).
andand
+1  A: 

If you allocate an array of boost::variant, then you can allow multiple different types at each position; however, the amount of space allocated per element will be equal the maximum for all the possible types. Note though, that if you only use the primitive types and void*, then that doesn't waste that much space.

Michael Aaron Safyan
The problem with this is that I won't necessarily know until run time what's in the various memory locations... it looks like boost::variant requires that the possible types be specified at compile time.
andand
@andand, that is correct; however, if you have some universal base class (let's call it Object), then you can achieve what you want using just the primitives and the type Object*.
Michael Aaron Safyan
+4  A: 

Hmm, since you are in C++, it sounds like you are looking for STL allocator and/or placement new.

Nikolai N Fetissov
+1 placement new
KitsuneYMG
The placement new has some possibilities... I'll look into it later (it's late here).
andand