Boost logo

Boost :

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


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

> Hi there,
>
> You can see the idea here:
> http://coliru.stacked-crooked.com/a/3e920faa604fa534
>
> Is there any technical reason not having boost::get work like that?
>

I like the idea of polymorthic_get<>. Created a ticket
https://svn.boost.org/trac/boost/ticket/9479

But I'm not sure that boost::get<> by default must work in that way. Won't
there be ambiguity with `operator Base()`? And what if the user stores Base
and Derived in boost::variant and want to chek that Base is stored in
variant, not Derived?

-- 
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