I currently can't use boost in a project and I've found myself missing boost::optional.
I've found this blog post which shows the idea behind boosts implementation. However, it doesn't take into account memory alignment issues and I'm not well versed enough in C++ to make the necessary changes. Does anyone know of an simple implementation of an optional type? If it makes it any easier I'm only looking for it to run on gcc 4.5 and vs2010 (so any c++0x features that they both support are fine).