Updated after refactoring variant with using boost any.