Subject: Re: [boost] [optional] Safe optional
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-11-19 02:01:41
On Wed, Nov 19, 2014 at 9:58 AM, Vicente J. Botet Escriba
> Le 19/11/14 01:55, Vladimir Batov a Ã©crit :
>> Hmm, aren't we talking about different conversions? I was referring to "T
>> to optional<T>". I have the feeling that you are referring to "optional<T>
>> to T". I've never been advocating the implicit latter.
> You are right. I was referring to optional<T> to T conversions. The T to
> optional<T> conversion suffer from overload resolution ambiguity.
> void f(int);
> void f(optional<int>);
> f(1); // ambiguous.
No, it's not. The second f() requires user-defined conversion and the
first one does not.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk