|
Boost : |
Subject: Re: [boost] [optional] Changes in Boost.Optional
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2014-09-09 01:45:55
On Tue Sep 09 2014 at 2:20:24 AM Andrzej Krzemienski <akrzemi1_at_[hidden]>
wrote:
>
> I went to see how Boost.Variant addresses this problem. Interestingly, it
> doesn't.
>
> #include <boost/variant.hpp>
>
> struct Wrapper
> {
> operator int () { return 9; }
> operator boost::variant<int, long> () { return 7; }
> };
>
> int main()
> {
> boost::variant<int, long> v = Wrapper();
> assert(boost::get<int>(v) == 7);
> }
>
> This program assertion-fails on MSVC.
>
>
Okay, that's interesting.
What's the process here, do we file a bug to Microsoft? Send in a defect
report to the committee? Do we know the clauses in the standard that's
supposed to make this "do the right thing"?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk