Boost logo

Boost :

Subject: Re: [boost] [variant] Why boost::get<Base>(derived) not supported?
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2013-12-07 09:52:59


2013/12/7 TONGARI J <tongari95_at_[hidden]>
<...>

> Maybe we can promote this idea to something more general, like
> 'variant_cast', not necessary have to be in base-derived relationship but
> just something convertible.
>
> Does that make sense?
>

I'd prefer not mixing functionalities. We can make polymorphic_get<> work
only for polymorphic casts (Base and Derived can be checked using type
trait).

-- 
Best regards,
Antony Polukhin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk