[boost] [ref][variant] use together with polymorphic behaviour