Note: I\'m aware of boost::variant, but I am curious about the design principles. This question mostly for self-education.
boost::variant
At the risk of providing a non-answer, since you are already using Boost, I recommend you try Boost.Variant or Boost.Any instead of rolling your own implementation.