David Abrahams wrote:
> "Peter Dimov" <[EMAIL PROTECTED]> writes:
>
>> Joel de Guzman wrote:
>>> David Abrahams wrote:
>>>
>>>> BTW, I just realized that a conversion from variant<T> to
>>>> optional<T> could be used to do extraction as well.  Maybe it

-------------^

>>>> would be better to ditch extract altogether and just use optional?
>>>
>>> I think this makes sense. The disadvantage is the overhead of
>>> optional just to do "extract"ion.
>>
>> That means an extra copy
>
> Really? You can't convert to an optional<T&>?

You said "optional<T>" above.

It may be possible to use optional<T&> (is it supported?) or optional<
reference_wrapper<T> > but this looks like an "obfuscated C++" entry to me
compared to T*. What's wrong with it? What does optional<T&> add?

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to