implementation of Haskell's maybe datatype in C++11.