Variation of C++ library boost.any without a getter