Have you used the Boost.Optional library? There is one thing you might need to keep an eye on as explained by Andrzej.
by Andrzej Krzemieński
From the article:
This post is about one gotcha in Boost.Optional library. When starting to use it, you might get the impression that when you try to put
Tis expected, you will get a compile-time error. In most of the cases it is exactly so, but sometimes you may get really surprised...